Cannot access a closed Stream of a memoryStream, how to reopen?

c#

Solution

How can I reopen a closed memory stream?

You can't reopen the stream. If you need to "reset" the stream, just assign it a new instance:

memoryStream = new MemoryStream();

Problem

I have a memoryStream instance and it is closed. I already have tried: ``` memoryStream.Flush(); memoryStream.Position=0; ``` To reopen the memory stream but it does not work. How can I reopen a closed memory stream?

Original source