OdbcDataReader.IsDBNull(Int32) 方法

定义

获取一个值,该值指示列中是否包含不存在或丢失的值。Gets a value that indicates whether the column contains nonexistent or missing values.

public:
 override bool IsDBNull(int i);
public:
 virtual bool IsDBNull(int i);
public override bool IsDBNull (int i);
public bool IsDBNull (int i);
override this.IsDBNull : int -> bool
abstract member IsDBNull : int -> bool
override this.IsDBNull : int -> bool
Public Overrides Function IsDBNull (i As Integer) As Boolean
Public Function IsDBNull (i As Integer) As Boolean

参数

i
Int32

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

返回

如果指定的列值等效于 true,则为 DBNull;否则为 falsetrue if the specified column value is equivalent to DBNull; otherwise false.

实现

注解

若要避免引发错误,请调用此方法,以在调用类型化 Get 方法之前(例如 GetByteGetChar等)查找空列值。To avoid raising an error, call this method to look for null column values before calling the typed Get methods (for example, GetByte, GetChar, and so on).

适用于

另请参阅