Since true
is not a string type, how is null + true
a string ?
string s = true; //Cannot implicitly convert type \'bool\' to \'string\
The compiler goes out hunting for an operator+() that can take a null argument first. None of the standard value types qualify, null is not a valid value for them. The one and only match is System.String.operator+(), there's no ambiguity.
The 2nd argument of that operator is also a string. That goes kapooey, cannot implicitly convert bool to string.