Removing data in a stream?

  • Thread starter Thread starter PBR
  • Start date Start date
P

PBR

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