c# or
if (2 > 1 || 1 == 1)
{
// 2 is greater than 1 and 1 is equal to 1!
}
c# or
if (2 > 1 || 1 == 1)
{
// 2 is greater than 1 and 1 is equal to 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
c# or
//the or operator in c sharp is "||" (key to the left of 1 btw ;))
if(a = 0 || b = 0)
{
//a or b is 0
}
or c#
float numberOne = 1;
string stringOne = "one";
if (numberOne == 1 || stringOne == "one")
{
print("numberOne or stringOne = 1")
}
and operator in c#
int x=10, y=5;
Console.WriteLine("----- Logic Operators -----");
Console.WriteLine(x > 10 && y < 10);
or operator in c#
int x=15, y=5;
Console.WriteLine("----- Logic Operators -----");
Console.WriteLine(x > 10 || 100 > x);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us