view raw
Mehdi Hadeli Mehdi Hadeli - 9 months ago 45
C# Question

How do I convert byte[] to stream in C#?

How can I convert

byte[]
array to stream in C#?

Answer

The easiest way to convert a byte array to a stream is using the MemoryStream class:

Stream stream = new MemoryStream(byteArray);