[This is preliminary documentation and is subject to change.]

Write a byte array to a Stream asynchronously.

Namespace: Simple.Web.HelpersSimple.Web.HelpersSimple::Web::Helpers
Assembly: Simple.Web (in Simple.Web.dll)

Syntax

C#

public static Task WriteAsync(

this Stream stream,

byte[] bytes,

int offset,

int length

)

VB

Public Shared Function WriteAsync( _

stream As Stream, _

bytes As Byte(), _

offset As Integer, _

length As Integer _

) As Task

C++

public:

static Task^ WriteAsync(

Stream^ stream,

array<char>^ bytes,

int offset,

int length

)

Parameters

stream
bytes
Type: System.Byte[]System.Byte()array<System::Byte>
The bytes to write to the stream.
offset
Type: System.Int32System.Int32System::Int32
The index within the byte array from which to write.
length
Type: System.Int32System.Int32System::Int32
The number of bytes to write to the stream.

Return Value

Type: System.Threading.Tasks.TaskSystem.Threading.Tasks.TaskSystem.Threading.Tasks::Task
A Task which will complete when all bytes have been written to the Stream.

See Also

AsyncExtensionsAsyncExtensionsAsyncExtensions Class
Simple.Web.HelpersSimple.Web.HelpersSimple::Web::Helpers Namespace