NullableTGetValueOrDefault Method (T) |
Retrieves the value of the current
NullableT object, or the specified default value.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public T GetValueOrDefault(
T defaultValue
)
Parameters
- defaultValue
- Type: T
A value to return if the HasValue property is false.
Return Value
Type:
TThe value of the
Value property if the
HasValue property is true; otherwise, the
defaultValue parameter.
See Also