System.Convert.IsDBNull Method

Returns an indication whether the specified object is of type DBNull.

Syntax

public static bool IsDBNull (object value)

Parameters

value
An object.

Returns

true if value is of type DBNull; otherwise, false.

Remarks

The Convert.IsDBNull(object) method tests whether the value parameter is equal to DBNull.Value. It is equivalent to the following code:

code reference: System.Convert.IsDBNull#1

Note:

DBNull.Value is used to indicate a value that is missing. It is not equivalent to null or to string.Empty. Therefore, code such as Convert.IsDBNull(null) in C# or Convert.IsDBNull(Nothing) in Visual Basic returns false.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0