Insert Duplicate into Hashset
-
Hello Every one, how can i insert duplicate value in HashSet
-
Hello Every one, how can i insert duplicate value in HashSet
You can't, by definition: The HashSet<(Of <(T>)>) class provides high performance set operations. A set is a collection that contains no duplicate elements, and whose elements are in no particular order. :omg:
Luc Pattyn [My Articles] Nil Volentibus Arduum
-
Hello Every one, how can i insert duplicate value in HashSet
You can't. Would the negative of the value work for you? Or use a Dictionary with a count of how many of the item you have. Or a Dictionary with a List of the duplicate items.
-
Hello Every one, how can i insert duplicate value in HashSet
-
Hello Every one, how can i insert duplicate value in HashSet
Check this url to help decipher when to use what collection class. http://geekswithblogs.net/BlackRabbitCoder/archive/2011/06/16/c.net-fundamentals-choosing-the-right-collection-class.aspx[^]
-
Hello Every one, how can i insert duplicate value in HashSet
Hi, You can use the HashSet as: Hashset(Key(Type1), Value (List(Type2)))
Dictionary> dicElements;