• 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 WriteAllBytesAsync

WriteAllBytesAsync(Stream, Byte[])

Writes all bytes in the specified byte array to the stream.

Declaration
public static Task WriteAllBytesAsync(this Stream stream, byte[] data)
Parameters
Type Name Description
System.IO.Stream stream

The stream.

System.Byte[] data

The bytes to be written.

Returns
Type Description
Task

The System.Threading.Tasks.Task instance that can be awaited.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if data or stream is null.

Back to top Copyright (c) 2017 Troy Willmot