ImmutableDictionary<TKey,TValue>.WithComparers 方法

定义

重载

WithComparers(IEqualityComparer<TKey>)

获取使用指定键比较器的不可变字典实例。

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

获取使用指定键和值比较器的不可变字典实例。

WithComparers(IEqualityComparer<TKey>)

Source:
ImmutableDictionary_2.cs
Source:
ImmutableDictionary_2.cs
Source:
ImmutableDictionary_2.cs

获取使用指定键比较器的不可变字典实例。

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

要使用的键比较器。

返回

使用给定比较器的不可变字典实例。

适用于

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

Source:
ImmutableDictionary_2.cs
Source:
ImmutableDictionary_2.cs
Source:
ImmutableDictionary_2.cs

获取使用指定键和值比较器的不可变字典实例。

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

要使用的键比较器。

valueComparer
IEqualityComparer<TValue>

要使用的值比较器。

返回

使用给定比较器的不可变字典实例。

适用于