CSharp examples for Language Basics:if
Use if statement to check int value
class iftest//from w w w . jav a 2s. c o m { 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"); } }