Wrap a delegate in an IEqualityComparer
On the importance of GetHashCode Others have already commented on the fact that any custom IEqualityComparer<T> implementation should really include a GetHashCode method; but nobody’s bothered to explain why in any detail. Here’s why. Your question specifically mentions the LINQ extension methods; nearly all of these rely on hash codes to work properly, because they … Read more