Is there a data structure built for this? Or do I have to do something like
combining the keys into a single element?

RE: Best practices for a two-keyed (i.e. 2-dimensional) hash table in by Quimbly

Quimbly
Wed Nov 30 09:46:01 CST 2005

No one has an answer?! I'm surprized! C'mon all you .NET gurus; speak up!

"Quimbly" wrote:

> Is there a data structure built for this? Or do I have to do something like
> combining the keys into a single element?
>

RE: Best practices for a two-keyed (i.e. 2-dimensional) hash table by tristan49

tristan49
Thu Dec 01 07:53:02 CST 2005

This works for a 2 dimensional hash table (although a bit more work than what
should be needed):
---------------------------------------
Hashtable firstD = new Hashtable();
firstD.Add( "first dimension key", new Hashtable() );
( ( Hashtable )firstD["first dimension key"] ).Add( "second dimension key",
"second dimension object" );
MessageBox.Show( ( ( Hashtable )firstD["first dimension key"] )["second
dimension key"].ToString() );
---------------------------------------

Chris

"Quimbly" wrote:

> No one has an answer?! I'm surprized! C'mon all you .NET gurus; speak up!
>
> "Quimbly" wrote:
>
> > Is there a data structure built for this? Or do I have to do something like
> > combining the keys into a single element?
> >