10
I have four bool variables, say :
bool a=true;
bool b=false;
bool c=true;
bool d=false;
then I want to check that those four are equal. However;
Console.WriteLine(true == false == true == false);
true
Why is this happening? I think it is because of evalution order of an equation, which goes from left to right :
((true == false) == true) == false
(false == true) == false
false == false
true
then What is a proper way to check whether all N>2 boolean variables are equal?