SqlDataRecord.GetValue(Int32) 方法
定义
为顺序自变量所指定的列,返回公共语言运行时 (CLR) 类型值。Returns the common language runtime (CLR) type value for the column specified by the ordinal argument.
public:
virtual System::Object ^ GetValue(int ordinal);
public virtual object GetValue (int ordinal);
abstract member GetValue : int -> obj
override this.GetValue : int -> obj
Public Overridable Function GetValue (ordinal As Integer) As Object
参数
- ordinal
- Int32
从零开始的列序号。The zero-based ordinal of the column.
返回
顺序指定的列的 CLR 类型值。The CLR type value of the column specified by the ordinal.
实现
例外
ordinal 小于 0 或大于列数(即 FieldCount)。The ordinal is less than 0 or greater than the number of columns (that is, FieldCount).
类型不匹配。There is a type mismatch.
注解
对于具有 null 值的列, Value 将返回。For columns with null value, Value is returned.