Answers for "c# and"

C#
17

c# or

// The or statement in C# is ||
if (a == b || a == c)
{
  // Do something
}
Posted by: Guest on February-22-2020
2

c# and

//the and operator in c sharp is "&&" (hold shift and 6 ;))
if(a == 0 && b == 0)
{
  //both a and b is 0	
}
Posted by: Guest on April-12-2021
3

c# and

//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
Posted by: Guest on November-03-2020
1

c# or

if (true || false) { //Checks if either side is true
  Console.WriteLine("One is true");
}

if (false || false) {
  Console.WriteLine("Both are false");
}

//Output:
//One is true
Posted by: Guest on November-03-2020
4

what is the or symbol in C#

//The or Symbol Is ||
Posted by: Guest on March-11-2020
3

what is the and in c#

//The AND Symbol is &
Posted by: Guest on May-07-2020

C# Answers by Framework

Browse Popular Code Answers by Language