Possible Duplicate:
Which collection for storing unique strings?
I am currently using a Dictionary<string, bool> to store a list of unique identifiers. These identifiers do not need to have any data associated with them – I am just using the Dictionary to be able to quickly check for duplicates.
Since I only need keys, and no values, is a Dictionary the way to go here, or is there another collection I don’t know about that would be better suited?
.NET 3.5 includes the
HashSet<T>collection type, which sounds like what you want.