Socarsky
Well-known member
How can I reset a StreamReader that return to beginning(start from beginning)?
I almost solve my issue that the reason only a StreamReader that it must be start from beginning when I get a line of string done. I want the same stance instance of treamReader to read continually. If not I must make more instance of StreamReader for each Do Until loop to get right line to assign.
I almost solve my issue that the reason only a StreamReader that it must be start from beginning when I get a line of string done. I want the same stance instance of treamReader to read continually. If not I must make more instance of StreamReader for each Do Until loop to get right line to assign.
curline = seclist.Count Dim reachToLine As Integer = 0 Dim swaptxt As String = "" '--this part is for only an example-- Do Until curline = 0 Select Case curline Case 5 Do Until reachToLine = seclist.Item(0) swaptxt = sr2.ReadLine reachToLine += 1 Loop Label1.Text = swaptxt reachToLine = 0 Case 4 Do Until reachToLine = seclist.Item(1) swaptxt = sr2.ReadLine reachToLine += 1 Loop Label2.Text = swaptxt reachToLine = 0 Case 3 Do Until reachToLine = seclist.Item(2) swaptxt = sr2.ReadLine reachToLine += 1 Loop Label3.Text = swaptxt reachToLine = 0 Case 2 Do Until reachToLine = seclist.Item(3) swaptxt = sr2.ReadLine reachToLine += 1 Loop Label4.Text = swaptxt reachToLine = 0 Case 1 Do Until reachToLine = seclist.Item(4) swaptxt = sr2.ReadLine reachToLine += 1 Loop Label5.Text = swaptxt reachToLine = 0 Case Else MessageBox.Show("list disi") End Select curline -= 1 Loop