I have a list that stores several objects. Each object has a property in the form of a variable.
I would like to check if any element in this list contains a specific property. Similar to Dictionary ContainsKey method. This data structure must contain an extremely large number of values, perhaps even millions, and therefore I would like to use a data structure that can check properties as quickly as possible.
Will the dictionary be the fastest for this job, or are there faster data structures?
EDIT:
Here is a quick, small example of what I would like to achieve:
Dictionary<string, Person> persons = new Dictionary<string, Person>();
source share