This may be a silly question but I am reading about that Hashtables and Dictionaries are faster than a list because they index the items with keys.
I know a List or Array is for elements without values, and a Dictionary is for elements with values. So I would think that it maybe be smart to have a Dictionary with the value that you need as a key and the value equal in all of them?
Update:
Based on the comments what I think I need is a HashSet. This question talks about their performance.
Hashtables and Dictionarys are faster than a list. Depends on what you do with them.HashSetwould provide the functionality that you are thinking with using aDictionaryand using the keys but not the values. The issue with that is they must be unique, but you'd have had the same thing using aDictionray"value that you need as a key"this won't be possible if you have duplicate values