J
Jon Shemitz
Why would you ever want to define both "public static bool operator
true" and "public static bool operator false" when you can just define
"public static implicit operator bool"?
Is there syntax where the two are not equivalent? Or are there cases
where you might legitimately want both false and true to return the
same value?
Fwiw, I'm having a hard time coming up with any C# 1.1 code that calls
true or false operators. I'm inclined to fault my understanding
because I'm generally very impressed with the quality of the C# design
and implementation - but it sure LOOKS like "operator true" and
"operator" false are just some sort of design archaeology that never
got thought through ....
true" and "public static bool operator false" when you can just define
"public static implicit operator bool"?
Is there syntax where the two are not equivalent? Or are there cases
where you might legitimately want both false and true to return the
same value?
Fwiw, I'm having a hard time coming up with any C# 1.1 code that calls
true or false operators. I'm inclined to fault my understanding
because I'm generally very impressed with the quality of the C# design
and implementation - but it sure LOOKS like "operator true" and
"operator" false are just some sort of design archaeology that never
got thought through ....