SqlDataRecord.Item[] 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Item[Int32] |
为列 |
Item[String] |
为列 |
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 返回 。