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.
 
Back
Top