I think you're question somewhat deteriorates at your point of reference.
There's nothing magic about a = b = c = 2
to suggest that a == b == c == 2
should work like you're wanting -- actually more-so the opposite.
The assignment operator is defined for only 2 operands and returns the value being set. A string of them simply passes the value from each operator to the next:
1: a = (b = (c = 2));
2: a = (b = (2));
3: a = (2);
So, the same is true for a == b == c == 2
:
1: bool allTwo = (a == (b == (c == 2)));
2: bool allTwo = (a == (b == ([Boolean])));
3: bool allTwo = (a == ([Boolean]));
4: bool allTwo = ([Boolean]);
So, the technical reason is simply that C#
doesn't contain a definition to have special treatment for a string of operators.
As for language design and implementation, the reason would probably be to prevent ambiguity and additional complexity. While you may want a == b == c == 2
defined as an all equal operator now, on the next line you may very well need it to act as currently implemented. How should the behaviors be distinguished? And would it be truly worth the effort to implement?
Or is a == 2 && b == 2
really that bad? ;)