CompressionStream.BeginWrite Method

Definition

Begins an asynchronous write operation.

public override IAsyncResult BeginWrite (byte[] array, int offset, int count, AsyncCallback asyncCallback, object asyncState);
override this.BeginWrite : byte[] * int * int * AsyncCallback * obj -> IAsyncResult

Parameters

array
Byte[]

The array to write data from.

offset
Int32

The byte offset in array to begin writing from.

count
Int32

The maximum number of bytes to write.

asyncCallback
AsyncCallback

An optional asynchronous callback, to be called when the write operation is complete.

asyncState
Object

A user-provided object that distinguishes this particular asynchronous write request from other requests.

Returns

An object that represents the asynchronous write operation, which could still be pending.

Exceptions

The method tried to write asynchronously past the end of the stream, or a disk error occurred.

One or more of the arguments is invalid.

The underlying stream is closed.

The current CompressionStream implementation does not support the write operation.

This call cannot be completed.

Applies to