.net 中相当于 java hashbag 集合的是什么?该集合只存储类似项一次,但也存储项出现的次数?
最佳答案
另请参阅:Duplicate keys in .NET dictionaries?包的另一个常见名称是 multiset,另请参阅:Are there any implementations of multiset for .Net?
通过这些链接我找到了 Wintellect 的 Power Collections bag执行。从其来源:
Bag<T> is a collection that contains items of type T.
Unlike a Set, duplicate items (items that compare equal to each other) are allowed in an
Bag.
我自己不是 .net 用户,所以我不知道这个库是否太旧而无法使用。希望对您有所帮助!
关于java - java hashbag 集合的 .net 等价物是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28004081/