0
Please define the prefix and postfix operators
increment operators
2 Answers
0
The prefix operator means that the increment / decrement is made before a function acts upon it, the postfix operator means that the increment / decrement is made after the function acts upon it. See the following as a demonstration:
int n = 1;
Console.WriteLine(n++); // returns 1
Console.WriteLine(n); // returns 2
int n = 1;
Console.WriteLine(++n); // returns 2
Console.WriteLine(n) // returns 2