G
Guest
In C I can open a file as readable, writable, or both. Then I can
arbitrarily do either operation without closing the file between operations
as long as I perform some kind of file position indicator repositioning when
I change between reading and writing. In C# I'd like something like a
StreamReaderWriter that I could use the same way, but there doesn't appear to
be such a thing. I don't want to have to repeatedly close, reopen, and
reseek since I in my application I would have to do this for each byte that I
write. Is it possible to open the same file with both a StreamReader and a
StreamWriter simultaneously?
Thanks!
Ray
arbitrarily do either operation without closing the file between operations
as long as I perform some kind of file position indicator repositioning when
I change between reading and writing. In C# I'd like something like a
StreamReaderWriter that I could use the same way, but there doesn't appear to
be such a thing. I don't want to have to repeatedly close, reopen, and
reseek since I in my application I would have to do this for each byte that I
write. Is it possible to open the same file with both a StreamReader and a
StreamWriter simultaneously?
Thanks!
Ray