How to create an instance of System.IO.Stream stream

Rauf picture Rauf · Nov 4, 2011 · Viewed 117k times · Source

How to create an instance of System.IO.Stream stream. One of my function receives System.IO.Stream stream as parameter and write some thing to it. So how can I create a new instance of the same and pass it to the function ?

Answer

Rauf picture Rauf · Nov 4, 2011
System.IO.Stream stream = new System.IO.MemoryStream();