PostSharpAPI ReferencePost­Sharp.​Patterns.​CollectionsAdvisable­Hash­Set<T>Advisable­Hash­Set
Open sandboxFocus

AdvisableHashSet<T> Constructor

AdvisableHashSet()

Initializes a new instance of the AdvisableHashSet<T> class that is empty and uses the default equality comparer for the set type.

Declaration
public AdvisableHashSet()

AdvisableHashSet(IEnumerable<T>)

Initializes a new instance of the AdvisableHashSet<T> 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.

Declaration
public AdvisableHashSet(IEnumerable<T> collection)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> collection

The collection whose elements are copied to the new set.

AdvisableHashSet(IEqualityComparer<T>)

Initializes a new instance of the AdvisableHashSet<T> class that is empty and uses the specified equality comparer for the set type.

Declaration
public AdvisableHashSet(IEqualityComparer<T> comparer)
Parameters
Type Name Description
System.Collections.Generic.IEqualityComparer<T> comparer

The System.Collections.Generic.IEqualityComparer<> implementation to use when comparing values in the set, or null to use the default EqualityComparer<T> implementation for the set type.

AdvisableHashSet(IEnumerable<T>, IEqualityComparer<T>)

Initializes a new instance of the AdvisableHashSet<T> 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.

Declaration
public AdvisableHashSet(IEnumerable<T> collection, IEqualityComparer<T> comparer)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> collection

The collection whose elements are copied to the new set.

System.Collections.Generic.IEqualityComparer<T> comparer

The System.Collections.Generic.IEqualityComparer<> implementation to use when comparing values in the set, or null to use the default EqualityComparer<T> implementation for the set type.

AdvisableHashSet(SerializationInfo, StreamingContext)

Declaration
protected AdvisableHashSet(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info
StreamingContext context