title: streamreader readline returns nothing when not eof
body: <p>I have a similar issue as <a href="https://stackoverflow.com/questions/25314889/streamreader-readline-returns-null-when-not-eof">StreamReader ReadLine returns null when not EOF</a> which I cannot figure out. The code is not complicated so I guess if it is really necessary:</p>
  
  <pre><code>Dim myFile As StreamReader
  
  If Not myFile.EndOfStream Then
      'Ignore header
      myFile.ReadLine()       
      Dim line As Integer = 0
      Do Until myFile.EndOfStream
          line += 1
          Dim currentLine = myFile.ReadLine()
          'At the point line = 4 currentLine is Nothing - why??
          processLine(currentLine)
      Loop
  End If
  </code></pre>
  
  <p>I can guarantee you that the file contains many more lines that 4 and no line is empty. The file is a bar ('|') delimited text file (*.txt) with 250 columns in it and how the file is created don't ask me that question. All I can say I have never had a problem up until recently with this one troublesome file, so how do I determine what the issue is. I have opened the file in NotePad++ and all seems ok. The consequence of file being corrupt if I stand correct is the program throws an exception as the process functions assumes it is not blank or if I choose to ignore blank line then it makes my code go into an infinite loop.</p>
  
  <p>Furthermore please note I am actually trying to edit legacy code (classic asp) so I need to translate it back to vbscript when I am done which uses a TextStream object which is similar to the code I have so I do not want to make it to complicated, i.e. no fancy .NET framework calls. I was using .NET to debug it.</p>