共用方式為


SqlDataRecord.GetByte(Int32) 方法

定義

取得序數所指定資料行的 Byte 值。

public:
 virtual System::Byte GetByte(int ordinal);
public virtual byte GetByte (int ordinal);
abstract member GetByte : int -> byte
override this.GetByte : int -> byte
Public Overridable Function GetByte (ordinal As Integer) As Byte

參數

ordinal
Int32

資料行以零為起始的序數。

傳回

資料行的 Byte 值。

實作

例外狀況

ordinal 小於 0 或大於資料行數目 (亦即 FieldCount)。

ordinal 指定的資料行為 null。

類型不符。

適用於