Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading last few lines of a file in C#

Status
Not open for further replies.

surovi99

IS-IT--Management
Feb 11, 2005
28
US
Hi,

Can anybody suggest some codes for reading the last few lines of a file?

Any help will be much appreciated.

Thanks
 
Using he StreamReader class you can move within the file by going to the BaseStream.Position based on the length of the FileStream.

These operations really haven't changed over the years and are basically the same as any other language. Just a different class and or member name to get to the line.

____________ signature below ______________
You are a amateur developer until you realize all your code sucks.
Jeff Atwood

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top