System.IO.IsolatedStorage.IsolatedStorageFileStream.EndRead Method

Ends a pending asynchronous read request.

Syntax

public override int EndRead (IAsyncResult asyncResult)

Parameters

asyncResult
The pending asynchronous request.

Returns

The number of bytes read from the stream, between zero and the number of requested bytes. Streams will only return zero at the end of the stream. Otherwise, they will block until at least one byte is available.

Remarks

IsolatedStorageFileStream.EndRead(IAsyncResult) must be called exactly once on every IAsyncResult object from IsolatedStorageFileStream.BeginRead(Byte[], int, int, AsyncCallback, object), and calling IsolatedStorageFileStream.EndRead(IAsyncResult) is the only way to know how many bytes were read from the System.IO.Stream. IsolatedStorageFileStream.EndRead(IAsyncResult) will block until the I/O operation has completed.

Requirements

Namespace: System.IO.IsolatedStorage
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0
Since: .NET 2.0