C# can't cast bool to int
Posted
by Svetlozar Angelov
on Stack Overflow
See other posts from Stack Overflow
or by Svetlozar Angelov
Published on 2009-06-03T19:31:59Z
Indexed on
2010/04/30
22:57 UTC
Read the original article
Hit count: 334
We all know that in C# we can't cast bool to int. I wanted to see what is the binary representation of true with bitmask, but I can't use (bool & int).. I think the problem is the architecture desicion "true is true, not any number != 0" (C++) and I was wondering what the benefits of such an architecture are? What is so bad with the C true/false concept?
© Stack Overflow or respective owner