Any of Dictionary<,>
, SortedList<,>
or SortedDictionary<,>
would be obvious choices - but note tha sorting becomes an issue here... Dictionary<,>
doesn't guarantee any particular order; the other two order by the keys rather than insertion order.
Note also that dictionary won't play very nicely with data-binding. It might be preferable to create something like a Collection<T>
, but encapsulate a Dictionary<,>
for lookups. It all depends on the scenario, of course.
More information on the performance etc differences between SortedList<,>
etc can be found here.