System.IO.IsolatedStorage.IsolatedStorageFileStream.BeginRead Method

Begins an asynchronous read.

Syntax

public override IAsyncResult BeginRead (byte[] buffer, int offset, int numBytes, AsyncCallback userCallback, object stateObject)

Parameters

buffer
The buffer to read data into.
offset
The byte offset in buffer at which to begin reading.
numBytes
The maximum number of bytes to read.
userCallback
The method to call when the asynchronous read operation is completed. This parameter is optional.
stateObject
The status of the asynchronous read.

Returns

An IAsyncResult object that represents the asynchronous read, which is possibly still pending. This IAsyncResult must be passed to this stream's IsolatedStorageFileStream.EndRead(IAsyncResult) method to determine how many bytes were read. This can be done either by the same code that called IsolatedStorageFileStream.BeginRead(Byte[], int, int, AsyncCallback, object) or in a callback passed to IsolatedStorageFileStream.BeginRead(Byte[], int, int, AsyncCallback, object).

Remarks

The current position in the stream is updated when you issue the asynchronous read or write, not when the I/O operation completes.

You must call System.IO.Stream.EndRead(IAsyncResult) with this IAsyncResult to find out how many bytes were read.

Requirements

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