Mega Code Archive

 
Categories / C# Tutorial / Operator
 

Logical operators with an if statement

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