|
![](/i/fill.gif) |
On 18/08/2013 02:23 PM, Warp wrote:
> Out of curiosity: Does C#, like C/C++, consider a non-boolean value as
> a valid boolean (where a boolean is expected)?
No.
(I just had to look that up.)
Apparently C# does not support implicit (or even explicit) conversion
between bool and any other type.
Which is weird, because this is the exact same programming language
where if you create an enum, it's actually just an int, as far as the
type system is concerned...
(Oh, but bool isn't an enum. Naturally.)
Post a reply to this message
|
![](/i/fill.gif) |