true expressions for operators: !=, >, < : Logical Relational Operators « Operator « C# / CSharp Tutorial






class MainClass
{
  public static void Main()
  {
    bool result;
    
    result = 10 != 1;
    System.Console.WriteLine("10 != 1 is " + result);
    result = 10 > 1;
    System.Console.WriteLine("10 > 1 is " + result);
    result = 10 >= 1;
    System.Console.WriteLine("10 >= 1 is " + result);
    int intValue1 = 10;
    int intValue2 = 1;
    result = intValue1 != intValue2;
    System.Console.WriteLine("intValue1 != intValue2 is " + result);
  }
}
10 != 1 is True
10 > 1 is True
10 >= 1 is True
intValue1 != intValue2 is True








3.6.Logical Relational Operators
3.6.1.Relational Operators
3.6.2.Logical operators
3.6.3.false expressions for operators: ==, > and <
3.6.4.true expressions for operators: !=, >, <
3.6.5.Boolean logical AND operator
3.6.6.Boolean logical OR operator
3.6.7.Boolean logical NOT operator
3.6.8.Logical operators with an if statement
3.6.9.List of Boolean Operators