简体   繁体   中英

What is the .net equivalent of a java hashbag collection

java hashbag集合的.net等效项是什么,该集合仅存储类似项的一次,但也存储项的出现次数?

See also: Duplicate keys in .NET dictionaries? Another common name for bag is multiset, see also: Are there any implementations of multiset for .Net?

Via those links I found the Wintellect's Power Collections bag implementation. From its source:

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.

Not a .net user myself so I don't know if this library is too old to be useful. Hopefully it helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM