How do I convert struct System.Byte byte[] to a System.IO.Stream object in C#?

.net, arrays, c#, stream

Solution

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

Stream stream = new MemoryStream(byteArray);

Problem

How do I convert struct `System.Byte` `byte[]` to a `System.IO.Stream` object in C#?

Original source