title: Stream read line
body: <p>I have a stream reader line by line (<code>sr.ReadLine()</code>). My code counts the line-end with both line endings <code>\r\n</code> and/or <code>\n</code>.</p>
  
  <pre><code>        StreamReader sr = new System.IO.StreamReader(sPath, enc);
  
          while (!sr.EndOfStream)
          {
              // reading 1 line of datafile
              string sLine = sr.ReadLine();
              ...
  </code></pre>
  
  <p>How to tell to code (instead of universal <code>sr.ReadLine()</code>) that I want to count new line only a full <code>\r\n</code> and not the <code>\n</code>?</p>