共用方式為


SqlDataRecord.Item[] 屬性

定義

多載

Item[Int32]

取得資料行 ordinal 引數所指定之資料行的通用語言執行平台 (CLR) 類型值。

Item[String]

取得資料行 name 引數所指定之資料行的通用語言執行平台 (CLR) 類型值。

Item[Int32]

取得資料行 ordinal 引數所指定之資料行的通用語言執行平台 (CLR) 類型值。

public:
 virtual property System::Object ^ default[int] { System::Object ^ get(int ordinal); };
public virtual object this[int ordinal] { get; }
member this.Item(int) : obj
Default Public Overridable ReadOnly Property Item(ordinal As Integer) As Object

參數

ordinal
Int32

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

屬性值

ordinal 指定的資料行 CLR 類型值。

實作

例外狀況

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

備註

如果是 Null 值的資料行, Value 則會傳回 。

適用於

Item[String]

取得資料行 name 引數所指定之資料行的通用語言執行平台 (CLR) 類型值。

public:
 virtual property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ name); };
public virtual object this[string name] { get; }
member this.Item(string) : obj
Default Public Overridable ReadOnly Property Item(name As String) As Object

參數

name
String

資料行名稱。

屬性值

name 指定的資料行 CLR 類型值。

實作

備註

如果是 Null 值的資料行, Value 則會傳回 。

適用於