boolean expressions, why just two terms?

Posted by Ed Guiness on Stack Overflow See other posts from Stack Overflow or by Ed Guiness
Published on 2010-06-09T15:29:37Z Indexed on 2010/06/09 15:32 UTC
Read the original article Hit count: 232

Given that it's valid to write

a = b = c = 2;

It would also be nice, rather than

bool allTwo = a == 2 && b == 2 && c == 2;

to instead write

bool allTwo = a == b == c == 2;

But I can't.

Is there a language-design reason for this?

© Stack Overflow or respective owner

Related posts about c#

Related posts about language-features