B
Bruce Wood
Paul,
What you say is true in C, but not in C#. C# requires that conditions
be boolean, which is different from int, so you cannot say
int a = 1;
int b = 2;
if (a & b) ...
The compiler will flag the "if" as an error, because the result of the
expression is int, not bool.
What you say is true in C, but not in C#. C# requires that conditions
be boolean, which is different from int, so you cannot say
int a = 1;
int b = 2;
if (a & b) ...
The compiler will flag the "if" as an error, because the result of the
expression is int, not bool.