DbDataReader.GetDecimal(Int32) 方法

定义

在派生类中重写时,以 Decimal 的形式获取指定列的值。When overridden in a derived class, gets the value of the specified column as a Decimal.

public:
 abstract System::Decimal GetDecimal(int ordinal);
public abstract decimal GetDecimal (int ordinal);
abstract member GetDecimal : int -> decimal
Public MustOverride Function GetDecimal (ordinal As Integer) As Decimal

参数

ordinal
Int32

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

返回

Decimal

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

实现

例外

列索引超出范围。The column index is out of range.

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

适用于