IDataRecord.Item[] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得指定的欄位。
多載
| 名稱 | Description |
|---|---|
| Item[Int32] |
取得位於指定索引的欄位。 |
| Item[String] |
取得指定名稱的欄位。 |
Item[Int32]
取得位於指定索引的欄位。
public:
property System::Object ^ default[int] { System::Object ^ get(int i); };
public object this[int i] { get; }
member this.Item(int) : obj
Default Public ReadOnly Property Item(i As Integer) As Object
參數
- i
- Int32
欄位的零基索引,得到。
屬性值
位於指定索引 Object的欄位為 。
例外狀況
通過的指數超出0到 FieldCount範圍。
適用於
Item[String]
取得指定名稱的欄位。
public:
property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ name); };
public object this[string name] { get; }
member this.Item(string) : obj
Default Public ReadOnly Property Item(name As String) As Object
參數
- name
- String
要找的柱名。
屬性值
指定名稱 Object為 .
例外狀況
未找到指定名稱的柱子。
備註
首先會執行大小寫區分查詢。 若失敗,則進行第二次不區寫搜尋。
這種方法對假名寬度不敏感。