SqlDataReader.GetDouble(Int32) 方法

定义

获取作为双精度浮点数的指定列的值。Gets the value of the specified column as a double-precision floating point number.

public:
 override double GetDouble(int i);
public:
 virtual double GetDouble(int i);
public override double GetDouble (int i);
public double GetDouble (int i);
override this.GetDouble : int -> double
abstract member GetDouble : int -> double
override this.GetDouble : int -> double
Public Overrides Function GetDouble (i As Integer) As Double
Public Function GetDouble (i As Integer) As Double

参数

i
Int32

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

返回

Double

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

实现

例外

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

注解

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

调用 IsDBNull 以在调用此方法前检查是否有 null 值。Call IsDBNull to check for null values before calling this method.

适用于