Interesting interview exercise result: return, post increment and ref behavior [duplicate]
i += Increment(ref i); is equivalent to i = i + Increment(ref i); The expression on the right hand side of the assignment is evaluated from left to right, so the next step is i = 0 + Increment(ref i); return i++ returns the current value of i (which is 0), then increments i i … Read more