Sdílet prostřednictvím


DataReader.GetBytes Method

Definition

Overloads

GetBytes(Int32, Byte[], Int32, Int32)

Retrieves a specified number of bytes of raw binary data.

GetBytes(String, Byte[], Int32, Int32)

Retrieves a specified number of bytes of raw binary data.

GetBytes(Int32, Byte[], Int32, Int32)

Retrieves a specified number of bytes of raw binary data.

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

Parameters

index
Int32

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

buffer
Byte[]

An array into which specified data, as a 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

The index of the starting point in the byte array specified in the buffer parameter.

length
Int32

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

Returns

An integer value indicating the number of bytes read into the buffer.

Implements

Exceptions

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

Applies to

GetBytes(String, Byte[], Int32, Int32)

Retrieves a specified number of bytes of raw binary data.

public:
 virtual int GetBytes(System::String ^ name, cli::array <System::Byte> ^ buffer, int bufferIndex, int length);
public virtual int GetBytes (string name, byte[] buffer, int bufferIndex, int length);
abstract member GetBytes : string * byte[] * int * int -> int
override this.GetBytes : string * byte[] * int * int -> int
Public Overridable Function GetBytes (name As String, buffer As Byte(), bufferIndex As Integer, length As Integer) As Integer

Parameters

name
String

The name of the item for which to retrieve raw binary data.

buffer
Byte[]

An array into which specified data, as a 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

The index of the starting point in the byte array specified in the buffer parameter.

length
Int32

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

Returns

An integer value indicating the number of bytes read into the buffer.

Implements

Applies to