Connecting Tech Pros Worldwide Help | Site Map

Re: When using System.IO.FileStream, I write 8 bytes, then seek to the start of the file, does the 8 bytes get flushed on seek and the buffer become a readbuffer at that point instead of being a write buffer?

Mark Salsbery [MVP]
Guest
 
Posts: n/a
#1: Jul 29 '08
"DR" <softwareengineer98037@yahoo.comwrote in message
news:Op0NyzR8IHA.1200@TK2MSFTNGP04.phx.gbl...
Quote:
When using System.IO.FileStream, I write 8 bytes, then seek to the start
of the file, does the 8 bytes get flushed on seek and the buffer become a
readbuffer at that point instead of being a write buffer?
If the filestream is opened for write access then it still keeps its write
access.

If you seek to the beginning after writing 8 bytes, and write some more
bytes, you overwrite the original bytes.

I don't believe there's any flush occurring on a seek...whether any buffers
need to be flushed would depend on the next read or write operation.

Mark

--
Mark Salsbery
Microsoft MVP - Visual C++

Quote:
>
>
Closed Thread