Stream. End Read(IAsyncResult) Method
Waits for the pending asynchronous read to complete. (Consider using ReadAsync(Byte, Int32, Int32, CancellationToken) instead.)
public: override int EndRead(IAsyncResult ^ asyncResult);
public override int EndRead (IAsyncResult asyncResult);
override this.EndRead : IAsyncResult -> int
Public Overrides Function EndRead (asyncResult As IAsyncResult) As Integer
The reference to the pending asynchronous request to finish.
The number of bytes read from the memory stream, between zero (0) and the number of bytes you requested. Returns zero (0) only at the end of the memory stream, otherwise, it should block until at least one byte is available.
A handle to the pending read operation is not available.
The pending operation does not support reading.
asyncResult did not originate from a BeginRead(Byte, Int32, Int32, AsyncCallback, Object) method on the current memory stream.
The stream is closed or an internal error has occurred.
Refer to the EndRead remarks for additional usage information for this method.