IDataRecord.Item[String] 属性

定义

获取指定的列。Gets the specified column.

重载

Item[Int32]

获取位于指定索引处的列。Gets the column located at the specified index.

Item[String]

获取具有指定名称的列。Gets the column with the specified name.

Item[Int32]

获取位于指定索引处的列。Gets the column located at the specified index.

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

要获取的列的从零开始的索引。The zero-based index of the column to get.

属性值

位于作为 Object 指定索引处的列。The column located at the specified index as an Object.

异常

传递的索引位于 0 至 FieldCount 的范围之外。The index passed was outside the range of 0 through FieldCount.

Item[String]

获取具有指定名称的列。Gets the column with the specified name.

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

要查找的列的名称。The name of the column to find.

属性值

具有指定名称、作为 Object 的列。The column with the specified name as an Object.

异常

未找到具有指定名称的列。No column with the specified name was found.

注解

首先执行区分大小写的查找。A case-sensitive lookup is performed first. 如果失败, 将进行第二个不区分大小写的搜索。If it fails, a second case-insensitive search is made.

此方法不区分假名宽度。This method is kana-width insensitive.

适用于