Showing results for March 2009 - Visual Studio Blog

Mar 25, 2009
Post comments count0
Post likes count1

How to use LINQ methods to compare objects of custom types

Visual Studio Team
Visual Studio Team

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>...

C#.NET Framework