DbDataReader.Item[] 属性

定义

Object 实例的形式获取指定列的值。Gets the value of a specified column as an instance of Object.

重载

Item[Int32]

在派生类中重写时,以 Object 实例的形式获取指定列的值。When overridden in a derived class, gets the value of the specified column as an instance of Object.

Item[String]

在派生类中重写时,以 Object 实例的形式获取指定列的值。When overridden in a derived class, gets the value of the specified column as an instance of Object.

Item[Int32]

在派生类中重写时,以 Object 实例的形式获取指定列的值。When overridden in a derived class, gets the value of the specified column as an instance of Object.

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

参数

ordinal
Int32

从零开始的列序号。The zero-based column ordinal.

属性值

Object

指定列的值。The value of the specified column.

实现

例外

列索引超出范围。The column index is out of range.

适用于

Item[String]

在派生类中重写时,以 Object 实例的形式获取指定列的值。When overridden in a derived class, gets the value of the specified column as an instance of Object.

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

参数

name
String

列的名称。The name of the column.

属性值

Object

指定列的值。The value of the specified column.

实现

例外

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

适用于