Nullable<T> Record

Definition

A nullable type can represent the normal range of values for its underlying value type, plus an additional Null value.

Delphi
type Nullable<T> = record

Type Parameters

T

The underlying value type of the Nullable<T> generic type.

Constructors

Create(T)

Initializes a new instance of the Nullable<T> structure to the specified value.

Create(Variant)

Initializes a new instance of the Nullable<T> structure to the specified value.

Properties

HasValue

Gets a value indicating whether the current Nullable<T> structure has a value.

Value

Gets the value of the current Nullable<T> value.

Methods

Equals(Nullable<T>)

Determines whether two nullable value are equal.

GetValueOrDefault

Retrieves the value of the current Nullable<T> object, or the object's default value.

GetValueOrDefault(T)

Retrieves the value of the current Nullable<T> object, or the specified default value.

ToString
ToVariant

Returns the stored value as variant.

TryGetValue(T)

Gets the stored value. Returns False if it does not contain a value.

Operators