Let’s say that I’m assigning a buffer in the MemoryStream constructor (buffer, offset, count).
How do the MemoryStream handle it? Will it copy the buffer, or use it? Will it use another buffer (autogrow) if I try to write more bytes than the length of the buffer?
Couldn’t find any relevant info at MSDN.
From MSDN: “Initializes a new non-resizable instance of the MemoryStream class based on the specified region (index) of a byte array.” I’ve used the (buffer) constructor before; it uses the array as the storage, with no copying involved.