OleDbDataReader.GetFloat(Int32) 方法

定义

获取指定列的单精度浮点数形式的值。Gets the value of the specified column as a single-precision floating-point number.

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

参数

ordinal
Int32

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

返回

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

异常

指定的强制转换无效。The specified cast is not valid.

注解

不执行任何转换。No conversions are performed. 因此,检索的数据必须已经是单精度浮点数。Therefore, the data retrieved must already be a single-precision floating-point number.

调用 IsDBNull 在调用此方法之前查找 null 值。Call IsDBNull to look for null values before calling this method.

适用于

另请参阅