DbDataReader.GetBytes(Int32, Int64, Byte[], Int32, Int32) 方法

定義

在衍生類別中覆寫時,從起始於指定索引的指定資料行讀取指定的位元組數,並將其寫入至起始於緩衝區中指定位置的緩衝區。

public:
 abstract long GetBytes(int ordinal, long dataOffset, cli::array <System::Byte> ^ buffer, int bufferOffset, int length);
public abstract long GetBytes (int ordinal, long dataOffset, byte[] buffer, int bufferOffset, int length);
public abstract long GetBytes (int ordinal, long dataOffset, byte[]? buffer, int bufferOffset, int length);
abstract member GetBytes : int * int64 * byte[] * int * int -> int64
Public MustOverride Function GetBytes (ordinal As Integer, dataOffset As Long, buffer As Byte(), bufferOffset As Integer, length As Integer) As Long

參數

ordinal
Int32

以零為基底的資料行序數。

dataOffset
Int64

要開始讀取作業之資料列中的來源索引。

buffer
Byte[]

要將資料複製到其中的目的緩衝區。

bufferOffset
Int32

要對其複製資料的緩衝區索引。

length
Int32

要讀取的最大位元組數。

傳回

讀取的實際位元組數目。

實作

例外狀況

資料行索引超出範圍。

指定的轉型無效。

適用於

另請參閱