C# program for Decrement Operator

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;



namespace ConsoleApplication92

{

    class Decrement_Operator

    {

        static void Main(string[] args)

        {



            int a = 1; // Initialization

            Console.WriteLine("The Value of a is {0}", a);



            a--; // a Decremented by one. It is post Decrement



            Console.WriteLine("\nNow, The value of a is {0}", a);



            Console.ReadLine();

        }

    }

}




Output :


Previous Post Next Post