Re: Can use use value to find key (HashTable)
- From: "Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 19 Aug 2005 14:45:10 -0400
ad,
You will have to maintain another hashtable which places the value in
for the key, and the key for the value in order to do a reverse lookup like
this.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
"ad" <ad@xxxxxxxxxxxxxxx> wrote in message
news:Ouxq%23xOpFHA.3936@xxxxxxxxxxxxxxxxxxxxxxx
>I have a hash table like:
> Hashtable myHT = new Hashtable();
> myHT.Add("First", "Hello");
> myHT.Add("Second", "World");
> myHT.Add("Third", "!");
>
> We can use key to find value like:
> myHT["First"] -> "Hello"
>
> But how can use use value to find key?
>
.
- References:
- Prev by Date: Re: Quick Pop-up Splash Screens II
- Next by Date: CurrencyManager Relations
- Previous by thread: Can use use value to find key (HashTable)
- Next by thread: Re: Can use use value to find key (HashTable)
- Index(es):
Relevant Pages
|