title: How to iterate in reverse through an OrderedDictionary
body: <p>How can I iterate through an <a href="https://msdn.microsoft.com/en-us/library/system.collections.specialized.ordereddictionary.aspx" rel="nofollow noreferrer">OrderedDictionary</a> in reverse and access its keys?</p>
  
  <p>Since it doesn't have any support for LINQ extensions, I have tried the following:</p>
  
  <pre><code>var orderedDictionary= new OrderedDictionary();
  orderedDictionary.Add("something", someObject);
  orderedDictionary.Add("another", anotherObject);
  
  for (var dictIndex = orderedDictionary.Count - 1; dictIndex != 0; dictIndex--)
  {
      // It gives me the value, but how do I get the key?
      // E.g., "something" and "another".
      var key = orderedDictionary[dictIndex];
  }
  </code></pre>