//the and operator in c sharp is "&&" (hold shift and 6 ;))
if(a == 0 && b == 0)
{
//both a and b is 0
}
//The AND (&&) statement will return true if both sides are true,
//otherwise it returns false
if (true && true) { //checks if both sides are true
Console.WriteLine("Both are true");
}
if (false && true) {
Console.WriteLine("One or more is false");
}
//Output:
//Both are true
//The AND Symbol is &
/* && would work only if both is true for example */ bool a = 1==2 && 1=< 2; // would be false
/* but if they are both true it would be true */ bool a = 1==1 && 1==1; // would be true