Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    Simply looking at the documentation for the method would tell you exactly what it does, and whether the behavior is intended or not. Commented Sep 15, 2016 at 14:26
  • Union, Except and Intersect all remove duplicates. Commented Sep 15, 2016 at 14:27
  • It is not removing duplicates from two lists. It is removing duplicates from the first list. Commented Sep 15, 2016 at 14:33
  • 2
    "Behavior is exactly as documented. Why didn't I bother reading the documentation?" Only you can answer that. Commented Sep 15, 2016 at 14:38
  • I've just run across this question and found an interesting article which compares Union, Intersect, Except and Distinct. It also describes how to tell Union which fields it should compare in a collection using an IEqualityComparer which helped me: c-sharpcorner.com/article/… Commented Nov 27, 2020 at 9:44