Comparison Operators

Comparison Operators
Rating: 5 - 1 Votes

Comparison Operators

C#The operators, which we use with If and Else statement for comparison are known as Comparison Operators. A list of comparison operators is given below with their symbolic representation.

Symbol Meaning
== Equal
!= Not Equal
> Greater Than
< Less Than
>= Greater Than or Equal
<= Less Than or Equal

 

A sample code is given below about the usage of Comparison Operators with If and Else statement.

Output:

The number is greater than or equal to 1.