Name
DBNull
Synopsis
DBNull
indicates the absence
of information, typically in a database application in which a field
does not contain any data. The types in the System.Data.SqlTypes
namespace have built-in support for DBNull
.
Note that Value
is not the same as
the Nothing
keyword in VB.NET. The Nothing
keyword can be used to release an object by clearing the reference. System.DBNull.Value
, on the other
hand, is a reference to a special value (a member of the singleton class DBNull
) that is used to indicate missing
information.
This class has some other uses, namely in COM Interop, in which it represents
a VT_EMPTY
variant (as opposed to a VT_NULL
variant, which is a null
reference).
Public NotInheritable Class DBNull : Implements System.Runtime.Serialization.ISerializable, IConvertible ' Public Shared Fields Public Shared ReadOnly Value As DBNull ' Public Instance Methods Public Sub GetObjectData( ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext) Implements ISerializable.GetObjectData Public Function GetTypeCode( ) As TypeCode Implements IConvertible.GetTypeCode Overrides Public Function ToString() As String Public Function ToString( ByVal provider As IFormatProvider) As String Implements IConvertible.ToString End Class
Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.