6
Vote

Exception on Nullable<T>.Value even if checked before

description

When using nullable types a suggestion appears after calling property Value. This should not happen if it was checked before that the property has a value. Example:
var text = source.IsCity == null ? "unknown" : (source.IsCity.Value ? "yes" : "no");