I want to know if it's faster and more efficient to store and access objects in a nested dictionary Dictionary<string, Dictionary<string, int>>
VS List<Object>
. Though adding objects in a nested dictionary requires writing more code by checking keys, what could be the other differences that are important to consider?
Example:
(1) Dictionary<string, Dictionary<string, int>>
Texas ----> Houston ----> Harris
----> Fortbend
----> [...other counties]
----> Dallas ----> ....
California ----> ..... ----> ...
(2) List<US>
US.States = Texas, US.City = Houston, Us.County = Harris