I\'ve seen them both being used in numerous pieces of C# code, and I\'d like to know when to use i++ or ++i (i being a number variable
i++
++i
i
int i = 0; Console.WriteLine(i++); // Prints 0. Then value of "i" becomes 1. Console.WriteLine(--i); // Value of "i" becomes 0. Then prints 0.
Does this answer your question ?