System.Nullable<T> Members

The members of System.Nullable<T> are listed below.

See Also: Inherited members from System.ValueType

Public Constructors

Constructs and initializes a new instance of Nullable<T> giving it the specified initial value.

Public Properties

[read-only]
HasValuebool.

Gets a value indicating whether the current Nullable`1 object has a valid value of its underlying type.

[read-only]
ValueT.

Gets the value of the current Nullable`1 object if it has been assigned a valid underlying value.

Public Methods

override
Equals(object) : bool

Indicates whether the current Nullable`1 object is equal to a specified object.

override
GetHashCode() : int

Retrieves the hash code of the object returned by the Nullable`1.Value property.

GetValueOrDefault() : T

Retrieves the value of the current Nullable`1 object, or the object's default value.

GetValueOrDefault(T) : T
Returns the value of the current instance, or if it has none, returns alternateDefaultValue.
override
ToString() : string

Returns the text representation of the value of the current Nullable`1 object.

Public Operators

static
Conversion to T(Explicit)Perform an explicit conversion of a Nullable<T> value to type T.
static
Conversion to System.Nullable<T>(Implicit)Perform an implicit conversion of a T value to Nullable<T>.