ToMemoryStream
public static MemoryStream ToMemoryStream(this Byte[] buffer) { MemoryStream ms = new MemoryStream(buffer); ms.Position = 0; return ms; }Example:
MemoryStream ms = File.ReadAllBytes(@"c:\test.txt").ToMemoryStream();
Description
Returns a MemoryStream from a Byte array
Details
- Author: Jonnidip
- Submitted on: 7/11/2012 11:29:56 AM
- Language: C#
- Type: System.Byte
- Views: 3023
Double click on the code to select all.