Should I allocate the memory or just the object of the memory stream: Is this OK?
MemoryStream memoryStream = new MemoryStream(); bitmap.Save(memoryStream, Syste
You don't need to preallocate memory.
You can get the size afterwards with memoryStream.Length.
memoryStream.Length
After you've done what you need to with your memoryStream, be sure to dispose it (or wrap it all in a using statement).
memoryStream
using