CompressionStream.EndRead(IAsyncResult) Method

Definition

Waits for the pending asynchronous read to complete.

public override int EndRead(IAsyncResult asyncResult);
override this.EndRead : IAsyncResult -> int

Parameters

asyncResult
IAsyncResult

The reference to the pending asynchronous request to finish.

Returns

The number of bytes read from the stream, between 0 (zero) and the number of bytes you requested. CompressionStream returns 0 only at the end of the stream; otherwise, it blocks until at least one byte is available.

Exceptions

The end call is invalid because asynchronous read operations for this stream are not yet complete.

Applies to