Click to See Complete Forum and Search --> : HashTable


Jedhi
February 13th, 2004, 09:08 AM
How do I add information other than key and value to a hashtable ??

Let say that my key is security number and value is the name. If I am interesting in adding additional information to the key like the address, how can I do this ?

pareshgh
February 14th, 2004, 01:31 AM
create as an object, and store it as a key.
if it is a big hex it would also serve as a string being key.

Jedhi
February 14th, 2004, 08:00 AM
Could you give me an example in C# of how you would do it if you had tree issues like security number as key, name as value and an address that is related to the key.

pareshgh
February 14th, 2004, 11:32 AM
like I said
the key can still server for identification
in hash table

and the value may contain object like

class MyInfo
{
...

}

you can store instances of MyInfo..