I'm using a Dictionary<string, object>
and I'm having an issue where I need to keep the items in the order they were placed in the dictionary, not in the alphabetical order of corresponding keys.
Is there a way to disable sorting of added items, or is it better to use some other custom class (I'd like to keep all dic[key] = value
and other accessors as is)?
And if it's not possible with a Dictionary
, what else can I use that still returns items by key?