共用方式為


ImmutableDictionary<TKey,TValue>.WithComparers 方法

定義

多載

WithComparers(IEqualityComparer<TKey>)

取得不可變字典的執行個體,該執行個體會使用指定的索引鍵比較子。

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

取得不可變字典的執行個體,該執行個體會使用指定的索引鍵和值比較子。

WithComparers(IEqualityComparer<TKey>)

來源:
ImmutableDictionary_2.cs
來源:
ImmutableDictionary_2.cs
來源:
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>)

來源:
ImmutableDictionary_2.cs
來源:
ImmutableDictionary_2.cs
來源:
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>

要使用的值比較子。

傳回

不可變字典的執行個體,該執行個體會使用指定的比較子。

適用於