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;
An IAsyncResult that references the asynchronous read.
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. |