T
Tony Johansson
Hi!
Note as I have noticed you can specify a larger buffer for StreamWrite in
the c-tor for StreamWrite and therefore skip the BufferedStream.
I just wonder if I still want to use a BufferedStream or a MemoryStream
aren't these more or less the same thing.
I mean if I use a BufferedStream this buffer is located in the memory. So I
mean that the functionality will be
about the same.
So the purpose of a BufferedStream is to keep a buffer so the number of
writes to the underlaying stream will be lower and
therefore increased performance.
The purpose with MemoryStream it to write to the MemoryStream from example a
StreamWriter and then use the MemoryStream with an encapulated FileStream to
write to a file.
So as a summary I see these two MemoryStream and the BufferedStream as doing
more or less the same thing ?
Do you agree with me ?
//Tony
Note as I have noticed you can specify a larger buffer for StreamWrite in
the c-tor for StreamWrite and therefore skip the BufferedStream.
I just wonder if I still want to use a BufferedStream or a MemoryStream
aren't these more or less the same thing.
I mean if I use a BufferedStream this buffer is located in the memory. So I
mean that the functionality will be
about the same.
So the purpose of a BufferedStream is to keep a buffer so the number of
writes to the underlaying stream will be lower and
therefore increased performance.
The purpose with MemoryStream it to write to the MemoryStream from example a
StreamWriter and then use the MemoryStream with an encapulated FileStream to
write to a file.
So as a summary I see these two MemoryStream and the BufferedStream as doing
more or less the same thing ?
Do you agree with me ?
//Tony