Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Addition - fun - not what I thought
Message
 
To
06/07/2009 04:27:45
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01410144
Message ID:
01410227
Views:
40
Hi Gregory,

http://en.csharp-online.net/ECMA-334:_14.14.2_Compound_assignment

states that x+=y is treated as x=x+y. C# evaluates an expression left to right. Hence x is the first value in the expression and evaluated before y (your complex expression which changes x) is evaluated.
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform