How can I get a hashtable key name from a value in VB.NET? -


I have hashtable in VB.NET and I need string value from its key. For example, if I do:

  hashtable.ed ("string1", "string2")  

how do I value "string1" Do you have "string 2"?

You (at least not looping without any value). Consider the fact that many keys can map to the same value:

  hashtable.ed ("string1", "string2") hashtable.add ("string3", " String 2 ")  

Now given" string2 "will you expect to come back?

If you really need to do a "reverse" lookup, then the simplest solution is probably two hashtable, another "reverse" lookup for "forward" lookup for.


Comments