About 52 results
Open links in new tab
  1. c# - Define: What is a HashSet? - Stack Overflow

    Dec 30, 2010 · A HashSet holds a set of objects, but in a way that allows you to easily and quickly determine whether an object is already in the set or not. It does so by internally managing an array …

  2. Difference between HashSet and HashMap? - Stack Overflow

    Apart from the fact that HashSet does not allow duplicate values, what is the difference between HashMap and HashSet in their implementation? It's a little bit vague because both use hash tables to...

  3. How to initialize HashSet values by construction? - Stack Overflow

    Jan 11, 2010 · Yes I sometimes forget that contrary to other collections the HashSet, HashMap have a different constructor: "Constructs a new, empty set; the backing HashMap instance has the specified …

  4. What's the difference between HashSet and Set? - Stack Overflow

    Apr 16, 2016 · 1 HashSet is a class derived from Set interface. As a derived class of Set, the HashSet attains the properties of Set. Important and the most frequently used derived classes of Set are …

  5. .net - HashSet vs. List performance - Stack Overflow

    It's clear that a search performance of the generic HashSet<T> class is higher than of the generic List<T> class. Just compare the hash-based key with the linear approach in the List&lt...

  6. Concurrent HashSet<T> in .NET Framework? - Stack Overflow

    Your implementation is correct. The .NET Framework does not provide a built-in concurrent hashset type, unfortunately. However, there are some workarounds. ConcurrentDictionary (recommended) …

  7. What is the difference between HashSet<T> and List<T>?

    Jun 18, 2011 · A HashSet<T> is a class designed to give you O(1) lookup for containment (i.e., does this collection contain a particular object, and tell me the answer fast). A List<T> is a class designed to …

  8. When should I use the HashSet<T> type? - Stack Overflow

    Aug 8, 2009 · HashSet<T> is a data strucutre in the .NET framework that is a capable of representing a mathematical set as an object. In this case, it uses hash codes (the GetHashCode result of each …

  9. How does HashSet compare elements for equality? - Stack Overflow

    Jan 21, 2012 · HashSet<T> constructor receive object what implement IEqualityComparer<T> for adding new object. If you want to use method in HashSet you need to overrride Equals() and GetHashCode().

  10. collections - What is the main difference between Hashset, Treeset and ...

    Switching to the difference between HashSet and LinkedHashSet, please note that LinkedHashSet is a subclass of HashSet. They are not sorted sets. HashSet is the fastest implementation of a set and it …