The value property is read-only and returns the type of the actual value. The value property can never be null.
If you expect to return a value with a null value, check the .HasValue value and then the Value link. For example, if you want to set the Nullable value to a regular bool, you need to specify its value:
bool? nullableBool = null; if (nullableBool.HasValue) { bool realBool = nullableBool.Value; }
However, the following will not compile:
bool? nullableBool = true; bool realBool = nullableBool;
Dan diplo
source share