我认为更好的方法是将多维键的许多字段封装到类/结构中。例如
struct Key { public readonly int Dimension1; public readonly bool Dimension2; public Key(int p1, bool p2) { Dimension1 = p1; Dimension2 = p2; } // Equals and GetHashCode ommitted}现在,您可以创建和使用普通的HashTable并将此包装用作键。



