Possible Duplicate:
How do I get the nth element from a Dictionary?
If there’s a Dictionary with total of Y items and we need Nth item when N < Y then how to achieve this?
Example:
Dictionary<int, string> items = new Dictionary<int, string>();
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);
How to write GetNthItem()?
Dictionary isn’t ordered. There is no nth item.
Use OrderedDictionary and Item()