IDataRecord.GetBoolean(Int32) 方法

定义

获取指定列的布尔值形式的值。Gets the value of the specified column as a Boolean.

public:
 bool GetBoolean(int i);
public bool GetBoolean (int i);
abstract member GetBoolean : int -> bool
Public Function GetBoolean (i As Integer) As Boolean

参数

i
Int32

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

返回

Boolean

列的值。The value of the column.

例外

传递的索引位于 0 至 FieldCount 的范围之外。The index passed was outside the range of 0 through FieldCount.

注解

不执行任何转换。No conversions are performed. 因此,检索的数据必须已是布尔值;否则,将生成异常。Therefore, the data retrieved must already be a Boolean; otherwise an exception is generated.

适用于