Search This Blog

Friday, February 7, 2014

Convert binary data to MemoryStream C#

C# > IO > MemoryStream

Creates a stream whose backing store is memory.

Example:

Convert binary data to MemoryStream

public MemoryStream GetMemoryFile(System.Data.Linq.Binary image)
{   
   return new MemoryStream(image.ToArray());
}