Are there ftell() and fseek() equivalents in C#

  • Thread starter Thread starter Trellow422
  • Start date Start date
T

Trellow422

How can I determine the physical location of the stream
reader pointer within a file? I need it to start reading
data from that position when the file is read at a later
time. I don't want to have to go back through the data
that was already read.

Any help would be appreciated.

Thanks!
 
Trellow,

You should be using the FileStream classes when reading/writing files.

In order to jump to a certain point in the stream, you can use the Seek
method on the FileStream class (which it obtains from the Stream class).
Also, to determine your current position in the Stream, you can use the
Position property.

Hope this helps.
 

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

Back
Top