@Armen sure; I understand that. I only mean in the context of the first line of this answer (hence quotes, albeit paraphrased)
@Marc: Except that I'm not looking for any code :)
I don't think he is looking for any code, but he's looking for a better understanding of the C# language. In particular in which order side effects happen and how the result of multiple assignments to the same variable within an expression behaves.
The prefix (i.e. ++i) has a higher periority than the postfix (i.e. i++)
With i++, the value of i is increased, but the value of i++ is not the new value of i, it's the previous value. So when you do i = i++, you're saying "increase the value of i, then set i to the old value".
i = ++iis the code that does what you think is going on here. i++ actually behaves a bit differently.
re the first line; just i++; would be the "code he is looking for"