I just had a Pwop moment (the sound of a forehead slap) with LINQ:
I needed to retrieve a distinct list of years contained in a collection of objects. The data was in the form of an generic List<T>, already loaded into memory. So without thinking too much about it, I sat down and wrote a quick LINQ expression that included the Distinct() operator and since the years were actually properties on the objects, I wrote my own implementation of IEqualityComparer.
It had some problems because the resulting data was not really all that distinct, and then it happened: PWOP!
I don't need to implement an interface. I can simply use the default equality comparer for a List<int> like so.
Gah!
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.