SqlDataRecord.GetFloat(Int32) SqlDataRecord.GetFloat(Int32) SqlDataRecord.GetFloat(Int32) SqlDataRecord.GetFloat(Int32) Method

定义

获取序号所指定的列的值,其形式为 floatGets the value for the column specified by the ordinal as a float.

public:
 virtual float GetFloat(int ordinal);
public virtual float GetFloat (int ordinal);
abstract member GetFloat : int -> single
override this.GetFloat : int -> single
Public Overridable Function GetFloat (ordinal As Integer) As Single

参数

ordinal
Int32 Int32 Int32 Int32

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

返回

float 形式的列值。The column value as a float.

实现

异常

ordinal 小于 0 或大于列数(即 FieldCount)。The ordinal is less than 0 or greater than the number of columns (that is, FieldCount).

ordinal 指定的列为 null。The column specified by ordinal is null.

适用于