Click or drag to resize
NullableT Structure
Represents an object whose underlying type is a value type that can also be assigned null like a reference type.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public struct Nullable<T>
where T : struct, new()

Type Parameters

T
The underlying value type of the NullableT generic type.

The NullableT type exposes the following members.

Methods
  NameDescription
Public methodEquals
Indicates whether the current NullableT object is equal to a specified object.
(Overrides ValueTypeEquals(Object).)
Public methodGetHashCode
Retrieves the hash code of the object returned by the Value property.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValueOrDefault
Retrieves the value of the current NullableT object, or the object's default value.
Public methodGetValueOrDefault(T)
Retrieves the value of the current NullableT object, or the specified default value.
Public methodToString
Returns the text representation of the value of the current NullableT object.
(Overrides ValueTypeToString.)
Top
Properties
  NameDescription
Public propertyHasValue
Gets a value indicating whether the current NullableT object has a value.
Public propertyValue
Gets the value of the current NullableT value.
Top
See Also