0
What happens if (++aNumber)? Say aNumber = 1
5 Answers
+ 1
int aNumber = 1;
Console.WriteLine(++aNumber); //prints 2, and aNumber is now 2
+ 1
It pre increments the number before being used, so it gets incremented first and then gets assigned to some other variable. I hope this helps.
0
Thanks bunches
0
Well... crap. Would it be the same for magic numbers?
0
in if, apart from 0, everything else is true. so, its 1 or 2 doesn't actually matter.