title: Why does StreamReader.ReadLine() return a value for a one line file with no newline?
body: <p>I want to append two text files together.  </p>
  
  <p>I have one file with a carriage return line feed at the end.  Observe file A which is 28 bytes.</p>
  
  <blockquote>
    <p>this is a line in the file\n</p>
  </blockquote>
  
  <p>then I have another file which is the same thing without the new line.  Observe file B which is 26 bytes.</p>
  
  <blockquote>
    <p>this is a line in the file</p>
  </blockquote>
  
  <p>I want to append the same file to itself (file A to A, and file B to B) and compare the byte counts.</p>
  
  <p>However, when using <code>StreamReader.ReadLine()</code> on file A, I get a value returned but MSDN says:</p>
  
  <blockquote>
    <p>A line is defined as a sequence of characters followed by a line feed ("\n"), a carriage return ("\r") or a carriage return immediately followed by a line feed ("\r\n"). The string that is returned does not contain the terminating carriage return or line feed. The returned value is null if the end of the input stream is reached.</p>
  </blockquote>
  
  <p>However, there is no crlf in the file.</p>
  
  <p>How can I safely append these files without adding an extra line break at the end?  For example, <code>StreamWriter.WriteLine()</code> will put an extra line break on file A when I don't want it to.  What would be an ideal approach?</p>