SqlDataReader.GetDecimal(Int32) 方法
定义
public:
override System::Decimal GetDecimal(int i);
public:
virtual System::Decimal GetDecimal(int i);
public override decimal GetDecimal (int i);
public decimal GetDecimal (int i);
override this.GetDecimal : int -> decimal
abstract member GetDecimal : int -> decimal
override this.GetDecimal : int -> decimal
Public Overrides Function GetDecimal (i As Integer) As Decimal
Public Function GetDecimal (i As Integer) As Decimal
参数
- i
- Int32
从零开始的列序号。The zero-based column ordinal.
返回
指定列的值。The value of the specified column.
实现
例外
指定的强制转换无效。The specified cast is not valid.
注解
不执行任何转换;因此,检索的数据必须已经是 Decimal 对象。No conversions are performed; therefore, the data retrieved must already be a Decimal object.
调用 IsDBNull 以在调用此方法前检查是否有 null 值。Call IsDBNull to check for null values before calling this method.