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>
要使用的值比较器。
返回
使用给定比较器的不可变字典的实例。