(newbie -vb2005) going back to begin of file with StreamReader

O

Opa Vito

Hello,

I do a reading of a file with a StreamReader, reading line after line.
How do I force the reader to go back to the beginning of the file and
start reading again (or go to a specified line) when it reaches the end
of the file?

Thanks

Opa Vito
 
H

Herfried K. Wagner [MVP]

Opa Vito said:
I do a reading of a file with a StreamReader, reading line after line.
How do I force the reader to go back to the beginning of the file and
start reading again (or go to a specified line) when it reaches the end of
the file?

'Reader.BaseStream.Position', for example. Check out the stream's 'Seek'
method too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top