I'm writing a piece of code in c#6 and for some strange reason this works
var value = objectThatMayBeNull?.property;
but this doesn't:
int value = nullableInt?.Value;
By not works I mean I get a compile error saying Cannot resolve symbol 'Value'
.
Any idea why the null conditional operator ?.
isn't working?