how does except method work in linq
问题 I have the classes: class SomeClass { public string Name{get;set;} public int SomeInt{get;set;} } class SomeComparison: IEqualityComparer<SomeClass> { public bool Equals(SomeClass s, SomeClass d) { return s.Name == d.Name; } public int GetHashCode(SomeClass a) { return (a.Name.GetHashCode() * 251); } } I also have two large List<SomeClass> called list1 and list2 before I used to have: var q = (from a in list1 from b in list2 where a.Name != b.Name select a).ToList(); and that took about 1