Constructors
-
Hash
Set`1() Initializes a new instance of the HashSet`1 class that is empty and uses the default equality comparer for the set type. -
Hash
Set`1(IEnumerable<`0>) Initializes a new instance of the HashSet`1 class that uses the default equality comparer for the set type, contains elements copied from the specified collection, and has sufficient capacity to accommodate the number of elements copied. -
Hash
Set`1(IEnumerable<`0>, Initializes a new instance of the HashSet`1 class that uses the specified equality comparer for the set type, contains elements copied from the specified collection, and has sufficient capacity to accommodate the number of elements copied.IEquality Comparer<`0>) -
Hash
Set`1(IEquality Initializes a new instance of the HashSet`1 class that is empty and uses the specified equality comparer for the set type.Comparer<`0>) -
Hash
Set`1(Int32) Initializes a new instance of the HashSet`1 class that is empty, but has reserved space for capacity items and uses the default equality comparer for the set type. -
Hash
Set`1(Int32, Initializes a new instance of the HashSet`1 class that uses the specified equality comparer for the set type, and has sufficient capacity to accommodate capacity elements.IEquality Comparer<`0>) -
Hash
Set`1(Serialization protected Initializes a new instance of the HashSet`1 class with serialized data.Info, Streaming Context)
Methods
- Add(`0) sealed Adds the specified element to a set.
- Clear() sealed Removes all elements from a HashSet`1 object.
- Contains(`0) sealed Determines whether a HashSet`1 object contains the specified element.
-
Copy
To(`0[]) Copies the elements of a HashSet`1 object to an array. -
Copy
To(`0[], sealed Copies the elements of a HashSet`1 object to an array, starting at the specified array index.Int32) -
Copy
To(`0[], Copies the specified number of elements of a HashSet`1 object to an array, starting at the specified array index.Int32, Int32) -
Create
Set static Returns an IEqualityComparer object that can be used for equality testing of a HashSet`1 object.Comparer() -
Ensure
Capacity(Int32) Ensures that this hash set can hold the specified number of elements without growing. -
Except
With(IEnumerable<`0>) sealed Removes all elements in the specified collection from the current HashSet`1 object. -
Get
Enumerator() Returns an enumerator that iterates through a HashSet`1 object. -
Get
Object virtual Implements the ISerializable interface and returns the data needed to serialize a HashSet`1 object.Data(Serialization Info, Streaming Context) -
Intersect
With(IEnumerable<`0>) sealed Modifies the current HashSet`1 object to contain only elements that are present in that object and in the specified collection. -
Is
Proper sealed Determines whether a HashSet`1 object is a proper subset of the specified collection.Subset Of(IEnumerable<`0>) -
Is
Proper sealed Determines whether a HashSet`1 object is a proper superset of the specified collection.Superset Of(IEnumerable<`0>) -
Is
Subset sealed Determines whether a HashSet`1 object is a subset of the specified collection.Of(IEnumerable<`0>) -
Is
Superset sealed Determines whether a HashSet`1 object is a superset of the specified collection.Of(IEnumerable<`0>) -
On
Deserialization(Object) virtual Implements the ISerializable interface and raises the deserialization event when the deserialization is complete. - Overlaps(IEnumerable<`0>) sealed Determines whether the current HashSet`1 object and a specified collection share common elements.
- Remove(`0) sealed Removes the specified element from a HashSet`1 object.
-
Remove
Where(Predicate<`0>) Removes all elements that match the conditions defined by the specified predicate from a HashSet`1 collection. -
Set
Equals(IEnumerable<`0>) sealed Determines whether a HashSet`1 object and the specified collection contain the same elements. -
Symmetric
Except sealed Modifies the current HashSet`1 object to contain only elements that are present either in that object or in the specified collection, but not both.With(IEnumerable<`0>) -
Trim
Excess() Sets the capacity of a HashSet`1 object to the actual number of elements it contains, rounded up to a nearby, implementation-specific value. -
Try
Get Searches the set for a given value and returns the equal value it finds, if any.Value(`0, `0&) -
Union
With(IEnumerable<`0>) sealed Modifies the current HashSet`1 object to contain all elements that are present in itself, the specified collection, or both.
Properties
- Comparer Gets the IEqualityComparer`1 object that is used to determine equality for the values in the set.
- Count sealed Gets the number of elements that are contained in a set.
-
System.
Collections. privatesealedGeneric. ICollection<T>. Is Read Only