Ends a pending asynchronous read request, and blocks until the read request has completed.
- asyncResult
- The IAsyncResult object for the pending asynchronous request.
A int containing the number of bytes read from the stream. Returns 0 only if the end of the file has been reached, otherwise, this method blocks until at least one byte is available.
Type Reason ArgumentNullException asyncResult is null. ArgumentException asyncResult was not returned by a call to FileStream.BeginRead(Byte[], int, int, AsyncCallback, object). InvalidOperationException FileStream.EndRead(IAsyncResult) was called multiple times with asyncResult .
EndRead will block until the I/O operation has completed.
Note: This method overrides Stream.EndRead(IAsyncResult).
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0