I wouldn't write code like that. IIRC it is up the the compiler whether it will do the x operator= or number-- first.
Write this instead:
number = x = number - 1
Both x and number = 5
It seems that if you write -- or ++ before the variable it takes priority. I still wouldn't write code like that.
Last edited on
I dont have visual studio atm. But are you suggesting 5 as an answer ? Why ?
Prefix vs suffis btw have you tried compiling it?