Logical operators with an if statement : Logical Relational Operators : Operator C# Examples


C# Examples » Operator » Logical Relational Operators »

 

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");
        }
    }
}
    
   
  
   



Output

and


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Operator
» Logical Relational Operators