Compartir a través de


Convert.IsDBNull Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Shared Function IsDBNull ( _
    value As Object _
) As Boolean
public static bool IsDBNull(
    Object value
)

Parameters

Return Value

Type: System.Boolean
true if value is of type DBNull; otherwise, false.

Remarks

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

Return DBNull.Value.Equals(value)
return DBNull.Value.Equals(value);
NoteNote:

DBNull.Value is used to indicate a value that is missing. It is not equivalent to nulla null reference (Nothing in Visual Basic) or to String.Empty.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.