jeudi 10 avril 2014

How to search by key in hashset?


Vote count:

0




I wanted a collection that would contain a bunch of unique strings. Hashset seemed to be the best option since it removes duplicates and is quick about it.


However how would i go about finding an item in the hash set? I could just loop through all the elements but wouldn't that defeat the purpose of being a hashset? Essentially i just want a dictionary where the key is the value.



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire