Convert problem
how can I convert byte[] to MemoryStream in c#
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted May 13, 2013, 12:25 AM
hi,
you can try following code
byte[] myByte = new byte[20];
//fill up you byte array..
MemoryStream stream = new MemoryStream();
stream.Write(myByteArray, 0, myByte.Length);
Alternatively way
byte[] myBytes = new byte[20];
//fill up you byte array..
MemoryStream stream = new MemoryStream(myBytes);
hope this will help you.
Satyapriya NayakPosted May 12, 2013, 5:43 AM
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/3206aa81-f83b-41c8-aded-6149ad88334d