OleDbDataReader.GetBoolean(Int32) 方法
定义
获取指定列的布尔值形式的值。Gets the value of the specified column as a Boolean.
public:
override bool GetBoolean(int ordinal);
public:
virtual bool GetBoolean(int ordinal);
public override bool GetBoolean (int ordinal);
public bool GetBoolean (int ordinal);
override this.GetBoolean : int -> bool
abstract member GetBoolean : int -> bool
override this.GetBoolean : int -> bool
Public Overrides Function GetBoolean (ordinal As Integer) As Boolean
Public Function GetBoolean (ordinal As Integer) As Boolean
参数
- ordinal
- Int32
从零开始的列序号。The zero-based column ordinal.
返回
列的值。The value of the column.
实现
例外
指定的强制转换无效。The specified cast is not valid.
注解
不执行任何转换;因此,检索的数据必须已是布尔值,否则将生成异常。No conversions are performed; therefore the data retrieved must already be a Boolean, or an exception is generated.
调用 IsDBNull 此方法之前,调用以查找 null 值。Call IsDBNull to look for null values before calling this method.