title: How to read a text file from last line to first line in c#
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/452902/how-to-read-a-text-file-reversely-with-iterator-in-c-sharp">How to read a text file reversely with iterator in C#</a>  </p>
  </blockquote>
  
  
  
  <p>I wanted to know how to read a text file from last line to first line in c#.</p>
  
  <p>I am using this code for reading a text file</p>
  
  <pre><code>            using (var sr = File.OpenText("C:\\test.txt"))
              {
                  string line;
                  bool flag = true;
                  while ((line = sr.ReadLine()) != null)
                  {
                  }
              }
  </code></pre>
  
  <p>I dont know how to read Backwards.</p>
  
  <p>There would be a great appreciation if someone could help me.</p>
  
  <p>Thanks In Advance.</p>