Hi,

When I process a text file, I do so line-by-line using:
VB Code:
  1. while not sr.EndOfStream
...but if the last line of the file contains data (i.e. there are no blank lines at the bottom), the last line doesn't get read. I do a workaround for this by opening up a file, adding a line then opening it up again to process. Pretty bad, huh?!

So what's the best way to get around the 'last line with data' prob? I suspect it might have something to do with "Peek", which I've never used.

Thank you!