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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a data structure built for this? Or do I have to do something like
combining the keys into a single element?
 
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() );
 
Back
Top