Foley .NET Utilities Class Library

HashSet Constructor (IHashCodeProvider, IComparer)

Creates an empty HashSet with the default initial capacity and using the default load factor, the specified hash code provider and the specified comparer.

[Visual Basic]
Overloads Public Sub New( _
   ByVal hcp As IHashCodeProvider, _
   ByVal comparer As IComparer _
)
[C#]
public HashSet(
   IHashCodeProvider hcp,
   IComparer comparer
);

Parameters

hcp
The IHashCodeProvider that supplies the hash codes for all elements in the HashSet.

-or-

A null reference (Nothing in Visual Basic) to use the default hash code provider, which is each element's implementation of GetHashCode.
comparer
The IComparer to use to determine whether two elements are equal.

-or-

A null reference (Nothing in Visual Basic) to use the default comparer, which is each element's implementation of Equals.

See Also

HashSet Class | HashSet Members | Foley.Utilities.Collections Namespace | HashSet Constructor Overload List