Imagine situation
int? customerId = null; // works fine
int? customerId = 5; // also fine
int? customerId = someCondition ? 5 : null; // There is no implicit conversion between int and null
int? customerId = someCondition ? 5 : (int?)null; // now is ok
How is this possible? Is it the language specification? For me the obvious would be implicit conversion. What do you think?