Mar 25, 2009
0
1
How to use LINQ methods to compare objects of custom types

LINQ provides a convenient syntax and many useful methods for operating with collections of objects. However, to be correctly processed by LINQ comparison methods such as Distinct or Intersect, a type must satisfy certain requirements.Let’s take a look at the Distinct method, which returns all distinct objects from a collection.List<int>...