How do I get a key from a OrderedDictionary in C# by index?

Red Swan picture Red Swan · Feb 9, 2010 · Viewed 21.5k times · Source

How do I get the key and value of item from OrderedDictionary by index?

Answer

Martin R-L picture Martin R-L · Dec 12, 2013
orderedDictionary.Cast<DictionaryEntry>().ElementAt(index);