What is the prefered method for creating a byte array from an input stream?
Here is my current solution with .NET 3.5.
Stream s;
byte[] b;
using (BinaryReader br = new BinaryReader(s))
{
b = br.ReadBytes((int)s.Length);
}
Is it still …
I have a stream that contains text, now I want to edit some text (replace some values) in that stream.
What is the most efficient way to do this, so without breaking the stream?
I want to use this in …