Begins an asynchronous read.

Namespace: VcClient.Test
Assembly: VcClient (in VcClient.dll) Version: 1.0.0.0 (1.8.400.4142)

Syntax

C#
public override IAsyncResult BeginRead(
	byte[] array,
	int offset,
	int numBytes,
	AsyncCallback userCallback,
	Object stateObject
)
Visual Basic
Public Overrides Function BeginRead ( _
	array As Byte(), _
	offset As Integer, _
	numBytes As Integer, _
	userCallback As AsyncCallback, _
	stateObject As Object _
) As IAsyncResult
Visual C++
public:
virtual IAsyncResult^ BeginRead(
	array<unsigned char>^ array, 
	int offset, 
	int numBytes, 
	AsyncCallback^ userCallback, 
	Object^ stateObject
) override

Parameters

array
Type: array<Byte>[]()[][]
The buffer to read data into.
offset
Type: Int32
The byte offset in array at which to begin reading.
numBytes
Type: Int32
The maximum number of bytes to read.
userCallback
Type: AsyncCallback
The method to be called when the asynchronous read operation is completed.
stateObject
Type: Object
A user-provided object that distinguishes this particular asynchronous read request from other requests.

Return Value

An System.IAsyncResult that references the asynchronous read.

Exceptions

ExceptionCondition
ArgumentExceptionThe array length minus offset is less than numBytes.
ArgumentNullExceptionarray is null.
ArgumentOutOfRangeExceptionoffset or numBytes is negative.
IOExceptionAn asynchronous read was attempted past the end of the file.

See Also