Line 1
This is line 1
Line 2
This is line 2
And here is the code :
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim read As New System.IO.StreamReader("C:\New Text document.txt")
For a As Integer = 0 To read.EndOfStream
TextBox1.Text = read.ReadToEnd
Next
It give an output as...
Line 1
This is line 1
Line 2
This is line 2
But how do i read line after specific line is read,as example i want it to read "This is line 2" as output after seaching word "Line 1". I know there is method called indexOf, but i actually not really know how to use it.

New Topic/Question
Reply



MultiQuote






|