Using LINQ to objects Intersect and Except on a specific property
问题 When I have 2 List<string> objects, then I can use Intersect and Except on them directly to get an output IEnumerable<string> . That's simple enough, but what if I want the intersection/disjuction on something more complex? Example, trying to get a collection of ClassA objects which is the result of the intersect on ClassA object's AStr1 and ClassB object's BStr ; : public class ClassA { public string AStr1 { get; set; } public string AStr2 { get; set; } public int AInt { get; set; } } public