Mono Class Library: System.IO.Stream Overview | Members

System.IO.Stream.EndRead Method

Ends a pending asynchronous read request. [Edit]

public virtual int EndRead (IAsyncResult asyncResult)

Parameters

asyncResult
The IAsyncResult object that references the pending asynchronous read request. [Edit]

Returns

A int that indicates the number of bytes read from the stream, between 0 and the number of bytes specified via the Stream.BeginRead(Byte[], int, int, AsyncCallback, object) parameter count. Streams only return 0 at the end of the stream, otherwise, they block until at least 1 byte is available. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionasyncResult is null. [Edit]
ArgumentExceptionasyncResult did not originate from a Stream.BeginRead(Byte[], int, int, AsyncCallback, object) method on the current stream. [Edit]

Remarks

Stream.EndRead(IAsyncResult) blocks until the I/O operation has completed.

Operation
As described above.

[Edit]

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0