Reads a block of bytes from the stream and writes the data in a given buffer.

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

Syntax

C#
public override int Read(
	byte[] array,
	int offset,
	int count
)
Visual Basic
Public Overrides Function Read ( _
	array As Byte(), _
	offset As Integer, _
	count As Integer _
) As Integer
Visual C++
public:
virtual int Read(
	array<unsigned char>^ array, 
	int offset, 
	int count
) override

Parameters

array
Type: array<Byte>[]()[][]
When this method returns, contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.
offset
Type: Int32
The byte offset in array at which the read bytes will be placed.
count
Type: Int32
The maximum number of bytes to read.

Return Value

The total number of bytes read into the buffer. This might be less than the number of bytes requested if that number of bytes are not currently available, or zero if the end of the stream is reached.

Exceptions

ExceptionCondition
ArgumentNullExceptionarray is null.
ArgumentOutOfRangeExceptionoffset or count is negative.
IOExceptionAn I/O error occurs.
ArgumentExceptionoffset and count describe an invalid range in array.
ObjectDisposedExceptionMethods were called after the stream was closed.

See Also