Collection requiring two keys to a unique value

前端 未结 2 1934
攒了一身酷
攒了一身酷 2021-01-27 06:10

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

2条回答
  •  执笔经年
    2021-01-27 06:45

    If you're running .NET 4 you should look at the Tuple class.

    IDictionary, V> - This is the proper way to represent a 2-key dictionary.

提交回复
热议问题