CSharp examples for Language Basics:Operator
Operator | Description |
---|---|
> | Greater than |
< | Less than |
== | Equal to |
!= | Not equal to |
>= | Greater than or equal to |
<= | Less than or equal to |
class iftest/* w ww .j ava 2s .c om*/ { static void Main() { int Val1 = 1; int Val2 = 0; System.Console.WriteLine("Getting ready to do the if..."); if (Val1 == Val2) { System.Console.WriteLine("If condition was true"); } System.Console.WriteLine("Done with the if statement"); } }