The assignment is a staple of many languages returning to C (and possibly earlier). C # supports it because it is a common function of such languages and has limited use of & mdash, like the goto operator.
Sometimes you can see this code:
int a, b, c; for(a = b = c = 100; a <= b; c--) { // some weird for-loop here }
Or that:
var node = leaf; while(null != node = node.parent) node.DoStuff();
This may make some code a little more compact or allow you to do some tricky tricks, but that of course does not make it more readable. I would recommend against this in most cases.
pswg
source share