title: How to loop over lines from a TextReader?
body: <p>How do I loop over lines from a <a href="http://msdn.microsoft.com/en-us/library/system.io.textreader.aspx">TextReader</a> <code>source</code>?</p>
  
  <p>I tried</p>
  
  <pre><code>foreach (var line in source)
  </code></pre>
  
  <p>But got the error</p>
  
  <blockquote>
    <p>foreach statement cannot operate on variables of type 'System.IO.TextReader' because 'System.IO.TextReader' does not contain a public definition for 'GetEnumerator'  </p>
  </blockquote>