Convert.ToBoolean and Boolean.Parse don’t accept 0 and 1

0 and (not-zero) are not equal to “false” and “true”, they’re just the representation chosen by C. Other languages use 0 for true and -1 for false, or other schemes entirely. A boolean is not a 0 or a 1, it’s a true or a false.

Should it also handle “yes” and “no”, “off” and “on”, and all of the myriad other things that are analogous to booleans? Where would you draw the line?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)