Mega Code Archive

 
Categories / C# Tutorial / Statement
 

A nested if statement

class MainClass {   public static void Main()   {     int intValue = 1500;     string stringValue = " ";     if (intValue < 1000)     {       System.Console.WriteLine("intValue < 1000");     }     else     {       System.Console.WriteLine("intValue >= 1000");       if (stringValue == "closed")       {         System.Console.WriteLine("closed");       }     }   } } intValue = 1000