Tell us what’s happening:
Describe your issue in detail here.
I’m having trouble understanding how the position of increment and decrement operators. Specifically, this example:
int value = 1;
value++;
Console.WriteLine("First: " + value);
Console.WriteLine($"Second: {value++}");
Console.WriteLine("Third: " + value);
Console.WriteLine("Fourth: " + (++value));
I’m unsure of the difference between having the + or - symbols in front of the variable and after the variable and what difference it makes to the final result.
Any help is appreciated!
Challenge Information:
Write Your First Code Using C# - Perform Basic Operations on Numbers in C#