共用方式為


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>

要使用的相等比較子。

傳回

此不可變雜湊集的執行個體,會使用指定的比較子。

適用於