John
0
Q:

or in C#

// The or statement in C# is ||
if (a == b || a == c)
{
  // Do something
}
14
// The Or Symbol Is   ||
0
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
1
float numberOne = 1;
string stringOne = "one";

if (numberOne == 1 || stringOne == "one") 
  {
  print("numberOne or stringOne = 1")
  }
1
//The or Symbol Is ||
4
//The AND Symbol is &
3
if((number > 10) || (number < 0))    Console.WriteLine("Hey! The number should be 0 or more and 10 or less!");else    Console.WriteLine("Good job!");
-2

New to Communities?

Join the community