ImmutableDictionary<TKey,TValue>.WithComparers 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
WithComparers(IEqualityComparer<TKey>) |
取得不可變字典的執行個體,該執行個體會使用指定的索引鍵比較子。 |
WithComparers(IEqualityComparer<TKey>, IEqualityComparer<TValue>) |
取得不可變字典的執行個體,該執行個體會使用指定的索引鍵和值比較子。 |
WithComparers(IEqualityComparer<TKey>)
取得不可變字典的執行個體,該執行個體會使用指定的索引鍵比較子。
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>)
取得不可變字典的執行個體,該執行個體會使用指定的索引鍵和值比較子。
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>
要使用的值比較子。
傳回
不可變字典的執行個體,該執行個體會使用指定的比較子。