Retrieves the value of the current Nullable`1 object, or the object's default value.
![]()
The value of the Nullable`1.Value property if the Nullable`1.HasValue property is true; otherwise, the default value of the current Nullable`1 object. The type of the default value is the type argument of the current Nullable`1 object, and the value of the default value consists solely of binary zeroes.
The erload:System.Nullable`1.GetValueOrDefault method returns a value even if the Nullable`1.HasValue property is false (unlike the Nullable`1.Value property, which throws an exception).