ImmutableSortedDictionary<TKey,TValue>.WithComparers 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
WithComparers(IComparer<TKey>) |
取得不可變排序字典之執行個體,該執行個體會使用指定的索引鍵比較子。 |
WithComparers(IComparer<TKey>, IEqualityComparer<TValue>) |
取得不可變排序字典之執行個體,該執行個體會使用指定的索引鍵和值比較子。 |
WithComparers(IComparer<TKey>)
取得不可變排序字典之執行個體,該執行個體會使用指定的索引鍵比較子。
public:
System::Collections::Immutable::ImmutableSortedDictionary<TKey, TValue> ^ WithComparers(System::Collections::Generic::IComparer<TKey> ^ keyComparer);
public System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> WithComparers (System.Collections.Generic.IComparer<TKey> keyComparer);
public System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> WithComparers (System.Collections.Generic.IComparer<TKey>? keyComparer);
member this.WithComparers : System.Collections.Generic.IComparer<'Key> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
Public Function WithComparers (keyComparer As IComparer(Of TKey)) As ImmutableSortedDictionary(Of TKey, TValue)
參數
- keyComparer
- IComparer<TKey>
要使用的索引鍵比較子。
傳回
不可變字典的執行個體,該執行個體會使用指定的比較子。
適用於
WithComparers(IComparer<TKey>, IEqualityComparer<TValue>)
取得不可變排序字典之執行個體,該執行個體會使用指定的索引鍵和值比較子。
public:
System::Collections::Immutable::ImmutableSortedDictionary<TKey, TValue> ^ WithComparers(System::Collections::Generic::IComparer<TKey> ^ keyComparer, System::Collections::Generic::IEqualityComparer<TValue> ^ valueComparer);
public System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> WithComparers (System.Collections.Generic.IComparer<TKey> keyComparer, System.Collections.Generic.IEqualityComparer<TValue> valueComparer);
public System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> WithComparers (System.Collections.Generic.IComparer<TKey>? keyComparer, System.Collections.Generic.IEqualityComparer<TValue>? valueComparer);
member this.WithComparers : System.Collections.Generic.IComparer<'Key> * System.Collections.Generic.IEqualityComparer<'Value> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
Public Function WithComparers (keyComparer As IComparer(Of TKey), valueComparer As IEqualityComparer(Of TValue)) As ImmutableSortedDictionary(Of TKey, TValue)
參數
- keyComparer
- IComparer<TKey>
要使用的索引鍵比較子。
- valueComparer
- IEqualityComparer<TValue>
要使用的值比較子。
傳回
不可變字典的執行個體,該執行個體會使用指定的比較子。