• Home
  • API Documentation
Show / Hide Table of Contents
  • McStreamy
    • ByteArrayExtensions
      • ToStream
    • NonClosingStreamAdapter
      • CanRead
      • CanSeek
      • CanTimeout
      • CanWrite
      • Dispose
      • Flush
      • Length
      • NonClosingStreamAdapter
      • Position
      • Read
      • ReadByte
      • ReadTimeout
      • Seek
      • SetLength
      • ToString
      • Write
      • WriteByte
      • WriteTimeout
    • StreamExtensions
      • ReadAllBytes
      • ReadAllBytesAsync
      • ReadAsString
      • ReadAsStringAsync
      • WriteAllBytes
      • WriteAllBytesAsync
    • StringExtensions
      • ToStream

Method ToStream

ToStream(Byte[])

Creates a new System.IO.MemoryStream using the byte array as the stream contents.

Declaration
public static MemoryStream ToStream(this byte[] buffer)
Parameters
Type Name Description
System.Byte[] buffer

The byte array to wrap in a stream.

Returns
Type Description
System.IO.MemoryStream

A System.IO.MemoryStream.

Back to top Copyright (c) 2017 Troy Willmot