I am a little confused about how the C# compiler handles pre- and post increments and decrements.
When I code the following:
int x = 4;
x = x++ + ++x
The most interesting thing that you'll get a completely different answer with C++.Net compiler.
int x = 4;
x = x++ + ++x; // x = 11
x = 4;
x = x-- - --x; // x = -1
Of course the difference in results is determined by different semantics - it seems normal. But despite the understanding the fact that two .net compilers don't behave in a similar manner for such basic things confuses me too.