Except has similar effect to Distinct?

The documentation for the Except function states:

Produces the set difference of two sequences by using the default equality comparer to compare values.

The set difference of two sets is defined as the members of the first set that do not appear in the second set.

The important word here is set, which is defined as:

…an abstract data structure that can store certain values, without any particular order, and no repeated values…

Because Except is documented as a set-based operation, it also has the effect of making the resulting values distinct.

Leave a Comment