I've just started with C#. I was reading about operator precedence and there was a part about precedence of unary operator. I've tried to imagine the situation where I can see such stuff. And for example:
int a = 5;
a = -a++;
Example is stupid but still... "Unaries" are right-associative. I expected a result of -6 but it's -5. I understand that "++" returns first then increments. But WHAT it increments if not "a"? Why "a" is not affected?
Thanks =]