Tip
If T is string and it is safe to use a non-randomized string comparer,
then you can pass StringSegmentComparer.Ordinal to the comparer parameter for better performance.
public ThreadSafeHashSet(
IEnumerable<T> collection,
IEqualityComparer<T>? comparer = null,
HashingStrategy strategy = HashingStrategy.Auto
)
Public Sub New (
collection As IEnumerable(Of T),
Optional comparer As IEqualityComparer(Of T) = Nothing,
Optional strategy As HashingStrategy = HashingStrategy.Auto
)
public:
ThreadSafeHashSet(
IEnumerable<T>^ collection,
IEqualityComparer<T>^ comparer = nullptr,
HashingStrategy strategy = HashingStrategy::Auto
)
new :
collection : IEnumerable<'T> *
?comparer : IEqualityComparer<'T> *
?strategy : HashingStrategy
(* Defaults:
let _comparer = defaultArg comparer null
let _strategy = defaultArg strategy HashingStrategy.Auto
*)
-> ThreadSafeHashSet