SqlDataRecord.GetValue(Int32) SqlDataRecord.GetValue(Int32) SqlDataRecord.GetValue(Int32) SqlDataRecord.GetValue(Int32) Method

定义

为顺序自变量所指定的列,返回公共语言运行时 (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 Int32 Int32 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).

注解

对于具有 null 值的列Value返回。For columns with null value, Value is returned.

适用于