NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

FileStream.BeginRead

Begins an asynchronous read.

[Visual Basic]
Overrides Public Function BeginRead( _
   ByVal array() As Byte, _
   ByVal offset As Integer, _
   ByVal numBytes As Integer, _
   ByVal cb As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public override IAsyncResult BeginRead(
   byte[] array,
   int offset,
   int numBytes,
   AsyncCallback cb,
   object stateObject
);
[C++]
public: override IAsyncResult* BeginRead(
   unsigned char* array[],
   int offset,
   int numBytes,
   AsyncCallback* cb,
   Object* stateObject
);
[JScript]
public override function BeginRead(
   array : Byte[],
   offset : int,
   numBytes : int,
   cb : AsyncCallback,
   stateObject : Object
) : IAsyncResult;

Parameters

array
The buffer to read data from.
offset
The byte offset in b at which to begin reading.
numBytes
The maximum number of bytes to read.
cb
The AsyncCallback.
stateObject
The state object.

Return Value

An IAsyncResult that references the asynchronous read.

Exceptions

Exception Type Condition
ArgumentException The array length minus offset is less than numBytes.
ArgumentNullException array is null.
ArgumentOutOfRangeException offset or numBytes are negative.
IOException An asynchronous read was attempted past the end of the file.

See Also

FileStream Class | FileStream Members | System.IO Namespace