SqlCeResultSet.IsDBNull 方法
确定在指定序号位置的字段是否为空。
命名空间: System.Data.SqlServerCe
程序集: System.Data.SqlServerCe(在 System.Data.SqlServerCe.dll 中)
语法
声明
Public Overrides Function IsDBNull ( _
ordinal As Integer _
) As Boolean
用法
Dim instance As SqlCeResultSet
Dim ordinal As Integer
Dim returnValue As Boolean
returnValue = instance.IsDBNull(ordinal)
public override bool IsDBNull(
int ordinal
)
public:
virtual bool IsDBNull(
int ordinal
) override
abstract IsDBNull :
ordinal:int -> bool
override IsDBNull :
ordinal:int -> bool
public override function IsDBNull(
ordinal : int
) : boolean
参数
- ordinal
类型:System.Int32
将从其中检索值的列的序号位置。
返回值
类型:System.Boolean
如果指定字段为空,则为 true;否则为 false。
实现
注释
只有在相应的值等效于 DBNull 时,或者在该对象实现 IsNullable 且 IsNull 返回 true 时,此函数才会返回 true。
在任何其他情况下(包括空引用和空的字符串)都会返回 false。
如果在指定的索引处不存在任何字段,则会引发 IndexOutOfRangeException。