Hi all

in my application ive open a file in the streamreader and pass that streamreader to a function which runs in a loop.
in that function im changing the position of the cursor to the begining of the file everytime it loops in the functions but problem it move the cursor to first character and then when i try to read a line it skip the first character which makin a problem for me.
is ther any way for that

Code:
Private function SearchSubFunction(sr as streamreader)

      sr.BaseStream.Seek(0, SeekOrigin.Begin)
      sr.Read()

       While sr.Peek() >= 0
             single_line = sr.ReadLine.Trim
             If single_line <> "" AndAlso single_line.StartsWith("'") = False  AndAlso single_line.ToUpper.StartsWith("DIM") = False Then

                   'my code goes here
            end if
      end while

End Function