I have a list of ~9000 products, and some of which may have duplicates.
I wanted to make a HashTable of these products with the products serial number as their key so I can find duplicates easily.
How would one go about using a HashTable in C#/.NET? Would a HashSet be more appropriate?
Eventually I would like a list like:
Key-Serial: 11110 - Contains: Product1
Key-Serial: 11111 - Contains: Product3, Product6, Product7
Key-Serial: 11112 - Contains: Product4
Key-Serial: 11113 - Contains: Product8, Product9
So, I have a list of all products, and they are grouped by the ones that have duplicate serial numbers. What is the "correct" way to do this?