I was wondering if anyone knew a good way to store data such that it would be indexed with two keys. Basically, I need something like a table (top-row is key1, left-column is k
I recommend:
Dictionary<Tuple<int, int>, char>
unless your table will be very large.
If you're running .NET 4 you should look at the Tuple class.
IDictionary<Tuple<K1, K2>, V> - This is the proper way to represent a 2-key dictionary.
IDictionary<Tuple<K1, K2>, V>