One, C # relational operators
The relational operator of the C # language is a comparison operation on operands.
Ii. examples
Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Text;
Namespace Test
{
Class Program
{
static void Main (string[] args)
{
C # relational operator-www.baike369.com
int x = n, y = 5;
Console.WriteLine ("Less than Operator:" + (x < y));
Console.WriteLine ("Greater Than Operator:" + (x > Y));
Console.WriteLine ("Less than or equal to operator:" + (x <= y));
Console.WriteLine ("Greater than or equal to operator:" + (x >= y));
Console.WriteLine ("Equals operator:" + (x = = y));
Console.WriteLine ("Not Equal to Operator:" + (x! = y));
Console.ReadLine ();
}
}
}
Operation Result:
Less than operator: False
Greater than Operator: True
Less than or equal to operator: False
Greater than or equal to operator: True
equals operator: False
Not equal to operator: True
C # Relational operators