Hi,
What's the most efficient way to remove data within a stream? For example,
say I have a MemoryStream, and I use a StreamWriter to write "Every dog has
it's day" into the memory stream. Now, I want to correct the grammar and
remove the apostrophe from "it's". I could read the text out and manipulate
the data as a string and then write the whole thing back in place of the
original bytes, but is there a way to basically "remove" bytes from the
stream and resize it appropriately, without reading the whole thing out to a
string first?
Thanks
Sijin Joseph - 27 Aug 2004 10:21 GMT
If the stream supports seeking (determined by the CanSeek prop) then you
can use the Seek() method to have random access to the stream rather
than sequential access.
Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
> Hi,
>
[quoted text clipped - 8 lines]
>
> Thanks