Possible Duplicate:
How to read a text file reversely with iterator in C#
I wanted to know how to read a text file from last line to first line in c#.
I am using this code for reading a text file
using (var sr = File.OpenText("C:\\test.txt")) { string line; bool flag = true; while ((line = sr.ReadLine()) != null) { } } I dont know how to read Backwards.
There would be a great appreciation if someone could help me.
Thanks In Advance.