streamreader readline stops at tabs

  • Thread starter Thread starter lfvoydfv
  • Start date Start date
L

lfvoydfv

Guest
I'm using StreamReader.ReadLine() to read in lines from a tab delimited text file. I've used this literally hundreds of times with no problems. However, when I'm reading one particular text file, I'm not getting a complete line. The first line in the file has 4 columns separated by tabs (2 tabs between third and fourth columns). The first call to ReadLine() reads the first column. The second call reads the next 2 columns. The third call reads the last column. When I step through in the debugger, I can see the tab after the text of the first column on the first read, the tab between the text of the second and third columns but no tab after the third column on the second read, and the fourth column preceded by 2 tabs on the third read. Does anyone know why ReadLine() is not reading to the end of the line?

Continue reading...
 
Back
Top