ImmutableHashSet<T>.WithComparer(IEqualityComparer<T>) 方法

定义

获取将指定的相等性比较器用于其搜索方法的不可变哈希集实例。Gets an instance of the immutable hash set that uses the specified equality comparer for its search methods.

public:
 System::Collections::Immutable::ImmutableHashSet<T> ^ WithComparer(System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);
public System.Collections.Immutable.ImmutableHashSet<T> WithComparer (System.Collections.Generic.IEqualityComparer<T> equalityComparer);
member this.WithComparer : System.Collections.Generic.IEqualityComparer<'T> -> System.Collections.Immutable.ImmutableHashSet<'T>
Public Function WithComparer (equalityComparer As IEqualityComparer(Of T)) As ImmutableHashSet(Of T)

参数

equalityComparer
IEqualityComparer<T>

要使用的相等性比较器。The equality comparer to use.

返回

此不可变哈希集的、使用给定比较器的实例。An instance of this immutable hash set that uses the given comparer.

适用于