I\'m basically looking for a way to access a hashtable value using a two-dimensional typed key in c#.
Eventually I would be able to do something like this
Just in case anyone is here recently, an example of how to do this the quick and dirty way in .Net 4.0, as described by one of the commenters.
class Program
{
static void Main(string[] args)
{
var twoDic = new Dictionary, String>();
twoDic.Add(new Tuple(3, true), "3 and true." );
twoDic.Add(new Tuple(4, true), "4 and true." );
twoDic.Add(new Tuple(3, false), "3 and false.");
// Will throw exception. Item with the same key already exists.
// twoDic.Add(new Tuple(3, true), "3 and true." );
Console.WriteLine(twoDic[new Tuple(3,false)]);
Console.WriteLine(twoDic[new Tuple(4,true)]);
// Outputs "3 and false." and "4 and true."
}
}