by Pieter Brinkman
19. April 2010 09:25
With the following code you can convert your MemoryStream to a Byte Array.
[code:c#]
//create new Bite Array
byte[] biteArray = new byte[memoryStream.Length];
//Set pointer to the beginning of the stream
memoryStream.Position = 0;
//Read the entire stream
memoryStream.Read(biteArray, 0, (int)memoryStream.Length);
[/code]