GetValueOrDefault()

Nullable::GetValueOrDefault(T) method

Returns the value represented by the current object or the specified value if the value represented by the current object is null.

T System::Nullable<T>::GetValueOrDefault(T default_value)

Arguments

ParameterTypeDescription
default_valueTThe value returned by the method if the value represented by the current object is null

Return Value

A copy of the value represented by the current object is it is not null, otherwise the specified value is returned

Nullable::GetValueOrDefault() method

T System::Nullable<T>::GetValueOrDefault()

See Also