Strip the last line from a text file

Posted by fraXis on Stack Overflow See other posts from Stack Overflow or by fraXis
Published on 2010-05-20T22:16:59Z Indexed on 2010/05/20 22:20 UTC
Read the original article Hit count: 307

Filed under:
|
|

Hello,

I need to strip the last line from a text file. I know how to open and save text files in C#, but how would I strip the last line of the text file?

The text file will always be different sizes (some have 80 lines, some have 20).

Can someone please show me how to do this?

Thanks.

© Stack Overflow or respective owner

Related posts about c#

Related posts about text