更新时间:2023-01-30 14:17:20
PowerCollections 库具有类 OrderedMultiDictionary
基本上类似于 SortedDictionary< TKey,TValue>
,但允许重复。当你查找一个键,你得到一个枚举而不是一个单一的值。
The PowerCollections library has a class called OrderedMultiDictionary<TKey, TValue>
that is basically like a SortedDictionary<TKey, TValue>
but allows duplicates. When you lookup a key, you get an enumerable instead of a single value.
库是免费的,你应该能够做到你想要的类 - 将值存储为键。
The library is free and you should be able to do exactly what you want with that class - store the values as the keys.