Let's say I have 4 variables
bool value1 = false;
bool value2 = false;
bool value3 = true;
bool value4 = false;
and they all don't have the same value (all are true || all are false)
I have found 2 approaches, anyway none of them looks easy to understand.
bool areDifferent = !(value1 == value2 == value3 == value4);
and
bool areDifferent = new[] { value1, value2, value3, value4 }.Distinct().Count() > 1;
Question: Is there a other approach, which is better in terms of readability / understandability?