When using the https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/arithmetic-operators#postfix-increment-operator[postfix increment] operator, it is important to know that the result of the expression `x++` is the value **before** the operation `x`.
* When assigning `x++` to `x`, it's the same as assigning `x` to itself, since the value is assigned before the increment takes place
* When returning `x++`, the returning value is `x`, not `x+1`
The same applies to the postfix and prefix https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/arithmetic-operators#decrement-operator---[decrement] operators.
== How to fix it
To solve the issue in assignments, eliminate the assignment, since `x\++` mutates `x` anyways.
To solve the issue in return statements, consider using the https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/arithmetic-operators#prefix-increment-operator[prefix increment] operator, since it works in reverse: the result of the expression `++x` is the value **after** the operation, which is `x+1`, as one might expect.
The same applies to the postfix and prefix https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/arithmetic-operators#decrement-operator---[decrement] operators.