Reputation: 42450
How can I get the key of a dictionary by passing the index value?
I'm trying:
If rs.Fields("NM").Value = dictNM.key(0)
that is, I want it to compare to the first key in the dictionary
but I get the error
Compile error: Invalid use of property
I tried googling, but to no avail. I'm hoping this is even possible.
Upvotes: 4
Views: 30526
Reputation: 195
Dictionary.ElementAt(index) works for me. It returns the Key/Value pair at the specified index.
Upvotes: 5