PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?UXVpbWJseQ==?=
Guest
Posts: n/a
 
      29th Nov 2005
Is there a data structure built for this? Or do I have to do something like
combining the keys into a single element?

 
Reply With Quote
 
 
 
 
=?Utf-8?B?UXVpbWJseQ==?=
Guest
Posts: n/a
 
      30th Nov 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?
>

 
Reply With Quote
 
=?Utf-8?B?YmFsbWVyY2g=?=
Guest
Posts: n/a
 
      1st Dec 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?
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What does this text mean it's about keyed hash(HMAC) Tony Johansson Microsoft C# .NET 0 22nd Apr 2010 05:35 PM
Comment on how to uniquely track your objects in C# / hash table /get hash code raylopez99 Microsoft C# .NET 25 11th Aug 2008 06:54 AM
Export 1-dimensional array values to a two-dimensional table? =?Utf-8?B?TGF1cmll?= Microsoft Excel Programming 2 8th Nov 2007 03:51 PM
Update non-keyed table Benny Microsoft C# .NET 0 30th Jan 2007 05:02 PM
Hash table Marty Microsoft VB .NET 7 20th Aug 2004 08:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:43 AM.