prefix decrement : Prefix Postfix Operator : Operator C# Examples


C# Examples » Operator » Prefix Postfix Operator »

 

prefix decrement









    
class  MainClass
{

    public  static  void  Main()
    {
        
        int  length  =  3;
        int  newLength  =  --length;
        System.Console.WriteLine("Prefix  decrement  example");
        System.Console.WriteLine("length  =  "  +  length);
        System.Console.WriteLine("newLength  =  "  +  newLength);
    }

}
    
   
  
   



Output

Prefix decrement example
length = 2
newLength = 2


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Operator
» Prefix Postfix Operator