title: How to retrieve Nth item in dictionary?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1172931/how-do-i-get-the-nth-element-from-a-dictionary">How do I get the nth element from a Dictionary?</a>  </p>
  </blockquote>
  
  
  
  <p>If there's a <code>Dictionary</code> with total of <code>Y</code> items and we need <code>N</code>th item when <code>N</code> &lt; <code>Y</code> then how to achieve this?</p>
  
  <p>Example:</p>
  
  <pre><code>Dictionary&lt;int, string&gt; items = new Dictionary&lt;int, string&gt;();
  
  items.add(2, "Bob");
  items.add(5, "Joe");
  items.add(9, "Eve");
  
  // We have 3 items in the dictionary.
  // How to retrieve the second one without knowing the Key?
  
  string item = GetNthItem(items, 2);
  </code></pre>
  
  <p>How to write <code>GetNthItem()</code>?</p>