基本上,我想是这样解释< Tkey1,TKey2,TValue>中而不是(我在这里看到的其他问题)与AND,但还是按键。为了更好地解释:我希望能够找到在字典中只提供的关键之一,而不是两个元素
Basically I want something like Dictionary<Tkey1, TKey2, TValue>, but not (as I've seen here in other question) with the keys in AND, but in OR. To better explain: I want to be able to find an element in the dictionary providing just one of the keys, not both.
我也认为我们应该考虑线程安全并轻松扩展到词典<的能力; Tkey1,TKey2,TKeyN,TValue>解决方案...
I also think we should consider thread-safety and the ability to easily scale to a Dictionary<Tkey1, TKey2, TKeyN, TValue> solution...
推荐答案我想实现这两个字典
Dictionary<TKey1, KeyValuePair<TKey2, TValue>> dict1; Dictionary<TKey2, KeyValuePair<TKey1, TValue>> dict2;如果您将得到您同时拥有的价值和其他键1键以及便于这样删除和更新。
That way if you are given 1 key you have both the value and the other key as well for easy deletes and updates.
更多推荐
如何实现多指标解释?
发布评论