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

定义

获取将指定的相等性比较器用于其搜索方法的不可变哈希集实例。

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);
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>

要使用的相等性比较器。

返回

此不可变哈希集的、使用给定比较器的实例。

适用于