I need to check if a sequence has any items satisfying some condition but at the same time NOT all items satisfying the same condition.
For example, for a sequence of 10
You'll like this.
var anyButNotAll = mySequence .Select(item => item.SomeStatus == SomeConst) .Distinct() .Take(2) .Count() == 2;
The Take(2) stops it iterating over any more elements than it has to.
Take(2)