Share via


AdoDotNetDataReader.GetBytes(Int32, Byte[], Int32, Int32) Method

Definition

Retrieves a specified number of bytes of binary data.

public:
 override int GetBytes(int index, cli::array <System::Byte> ^ buffer, int bufferIndex, int length);
public override int GetBytes (int index, byte[] buffer, int bufferIndex, int length);
override this.GetBytes : int * byte[] * int * int -> int
Public Overrides Function GetBytes (index As Integer, buffer As Byte(), bufferIndex As Integer, length As Integer) As Integer

Parameters

index
Int32

Index into the current block of data for the item to retrieve.

buffer
Byte[]

An array into which specified data, as byte array, should be placed. If null, this method returns the size required of the array in order to fit all of the specified data.

bufferIndex
Int32

Index of starting point in the byte array specified with the buffer parameter.

length
Int32

The number of bytes to be read into the byte array specified with the buffer parameter.

Returns

Returns a numerical value indicating the number of bytes read into the buffer.

Exceptions

The index, bufferIndex, and/or length parameters are invalid.

Applies to