double? test = true ? null : 1.0;
In my book, this is the same as
if (true) {
test = null;
} else {
test = 1.0;
}
But the first line gives this compiler error:
See Question&Answers more detail:osType of conditional expression cannot be determined because there is no implicit conversion between '
<null>
' and 'double
'.