ImmutableDictionary<TKey,TValue>.WithComparers 方法

定义

重载

WithComparers(IEqualityComparer<TKey>)

获取使用指定键比较器的不可变字典实例。Gets an instance of the immutable dictionary that uses the specified key comparer.

WithComparers(IEqualityComparer<TKey>, IEqualityComparer<TValue>)

获取使用指定键和值比较器的不可变字典实例。Gets an instance of the immutable dictionary that uses the specified key and value comparers.

WithComparers(IEqualityComparer<TKey>)

获取使用指定键比较器的不可变字典实例。Gets an instance of the immutable dictionary that uses the specified key comparer.

public:
 System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ WithComparers(System::Collections::Generic::IEqualityComparer<TKey> ^ keyComparer);
public System.Collections.Immutable.ImmutableDictionary<TKey,TValue> WithComparers (System.Collections.Generic.IEqualityComparer<TKey> keyComparer);
member this.WithComparers : System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
Public Function WithComparers (keyComparer As IEqualityComparer(Of TKey)) As ImmutableDictionary(Of TKey, TValue)

参数

keyComparer
IEqualityComparer<TKey>

要使用的键比较器。The key comparer to use.

返回

使用给定比较器的不可变字典实例。An instance of the immutable dictionary that uses the given comparer.

WithComparers(IEqualityComparer<TKey>, IEqualityComparer<TValue>)

获取使用指定键和值比较器的不可变字典实例。Gets an instance of the immutable dictionary that uses the specified key and value comparers.

public:
 System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ WithComparers(System::Collections::Generic::IEqualityComparer<TKey> ^ keyComparer, System::Collections::Generic::IEqualityComparer<TValue> ^ valueComparer);
public System.Collections.Immutable.ImmutableDictionary<TKey,TValue> WithComparers (System.Collections.Generic.IEqualityComparer<TKey> keyComparer, System.Collections.Generic.IEqualityComparer<TValue> valueComparer);
member this.WithComparers : System.Collections.Generic.IEqualityComparer<'Key> * System.Collections.Generic.IEqualityComparer<'Value> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
Public Function WithComparers (keyComparer As IEqualityComparer(Of TKey), valueComparer As IEqualityComparer(Of TValue)) As ImmutableDictionary(Of TKey, TValue)

参数

keyComparer
IEqualityComparer<TKey>

要使用的键比较器。The key comparer to use.

valueComparer
IEqualityComparer<TValue>

要使用的值比较器。The value comparer to use.

返回

使用给定比较器的不可变字典实例。An instance of the immutable dictionary that uses the given comparers.

适用于