ImmutableHashSet<T>.WithComparer(IEqualityComparer<T>) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取不可变哈希集的实例,该实例使用其搜索方法的指定相等比较器。
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>
要使用的相等比较器。
返回
使用此给定比较器的不可变哈希集的实例。