all groups > c# > july 2005 >
You're in the

c#

group:

Read text file bottom up


RE: Read text file bottom up Mark R. Dawson
7/18/2005 7:45:02 PM
c#:
Hi Lam,
you can use the ReadBlock method of StreamReader to read in a block of
data from a specified starting position

ReadBlock(char[], intIndex, intCount);

the char[] is where the data will be read to, intIndex is the starting
position of where to read and intCount is the max number of characters to
read.

You can have a loop which decrements intIndex from max to min which will
read the file backwards.


Hope that helps
Mark.

[quoted text, click to view]
Read text file bottom up Lam
7/18/2005 9:58:37 PM
Hi

the default readline method in StreamReader read the text from the top to
bottom
how can I read a text file from the bottom to the top?
Thanks

Re: Read text file bottom up Lam
7/19/2005 3:48:55 PM
Thanks
one more question
How can I delete the line after I read in the line from the text file?

[quoted text, click to view]

AddThis Social Bookmark Button