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] "Lam" wrote:
> 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
>
>
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] "Mark R. Dawson" <MarkRDawson@discussions.microsoft.com> wrote in message
news:C9B1FA70-C580-4833-885C-177FA6A64D5E@microsoft.com...
> 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.
>
> "Lam" wrote:
>
> > 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
> >
> >
> >