HashTable LookUP

G

Guest

I have created a hash table;

dim h as new hashtable
h.Add (0, "No Choice")
h.Add(1, "First Choice")
h.Add(2, "Second Choice")

What I want to do is supply a value such as "First Choice" and return the
key 1. I have found out how to enumerate all the values to the console, but
I simply want to return the Key for a specific value or the value for a
specific key. Any help would be appreciated. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top