In C#, is there a difference between the code (all in one statement, not part of a larger one) arr[0]++;
and ++arr[0];
I fully understand, that in C / C++ / Objective-C, that this would not do the same thing, first case would get the value at arr's 0th index and increment that value by one, while the second one, increases the pointer value of arr, and does nothing to it's 0th position (same as arr[1]; arr++;
).
Thanks to sth, he has reminded me that this is the same in C# and C / C++ / Obj-C.
However, is there a difference between the two statements in C#?