For Dictionary<,>
"The order in which the items are returned is undefined".
I know there is SortedDictionary
, but if I just want a dictionary that gives me back the elements in the order I put them in, what is the best thing to do?
I'm thinking that I should use a List<KeyValuePair<,>>
and convert that to a Dictionary when I need to do a lookup (as opposed to doing a foreach on the Dictionary).
Or am I missing something smarter?