Below is a sample code snippet demonstrating the Postfix and Prefix Operator in C#
using System; namespace AbundantCode { internal class Program { //Arithmetic Operators in C# private static void Main(string[] args) { int Input = 100; Input = Input++; Console.WriteLine("The output of the AbundantCode is " + Input.ToString()); Input = ++Input; Console.WriteLine("The output of the AbundantCode is " + Input.ToString()); Input = Input--; Console.WriteLine("The output of the AbundantCode is " + Input.ToString()); Input = --Input; Console.WriteLine("The output of the AbundantCode is " + Input.ToString()); Console.ReadLine(); } } }
Leave a Reply