Just came across a weird error:
private bool GetBoolValue()
{
//do some logic and return true or false
}
Then, in another method, something like this:
int? x = GetBoolValue() ? 10 : null;
Simple, if the method returns true, assign 10 to the Nullabale x, otherwise, assign null to the NULLABLE int. However, the compiler complains:
Error 1 Type of conditional expression cannot be determined because there is no implicit conversion between 'int' and '<null>'
Am I going nuts?