Get index from a Dictionary

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?THVpZ2k=?=

    Get index from a Dictionary

    Hi all,
    I have a Dictionary like this:

    Dictionary<stri ng, Object>

    and I need to retrieve the index (0,1,2, etc) of a particular key (based on
    dictionary insertion).

    How can I accomplish this?

    Thanks in advance.

    --
    Luigi

  • Peter Morris

    #2
    Re: Get index from a Dictionary

    Create a facade class that acts as the data source. Inside that class have
    both a List and a Dictionary that you maintain. Use the dictionary for
    quickly locating items based on their key, and the list for determining
    items at a specific index.



    --
    Pete
    ====



    Comment

    Working...