I have a List<> of objects in C# and I need a way to return those objects that are considered duplicates within the list. I do not need the Distinct resultset, I need a
Without actually coding it, how about an algorithm something like this:
List creating a DictionaryDictionary deleting entries where the int is >1Anything left in the Dictionary has duplicates. The second part where you actually delete is optional, of course. You can just iterate through the Dictionary and look for the >1's to take action.
EDIT: OK, I bumped up Ryan's since he actually gave you code. ;)