Double keyed tables

Do you ever find yourself in the need of double keyed tables? Well I do!

If you’re now quite sure what I mean about this I’ll try and sum it up. Imagine a Hashtable where you supply a key-pair instead of one key.

myHashtable.Put(key1, key2, value);

Or if you like that flavor

myHashtable[key1, key2] = value;

So far I haven’t found a good implementation of this scenario which leads me to the only solution: Do it yourself!

Edit: During my work yesterday I made a generic class for double keyed tables. The overall time it took was about 30 minutes and was really worth it! As a natural consequence I can’t reveal the source code here.