ImmutableSortedDictionary.CreateRange 方法

定義

多載

CreateRange<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>)

建立不可變的排序字典,其中包含指定的項目,並使用預設的比較子。

CreateRange<TKey,TValue>(IComparer<TKey>, IEnumerable<KeyValuePair<TKey,TValue>>)

使用指定的索引鍵比較子,從指定的項目範圍,建立新的、不可變的排序字典。

CreateRange<TKey,TValue>(IComparer<TKey>, IEqualityComparer<TValue>, IEnumerable<KeyValuePair<TKey,TValue>>)

使用指定的索引鍵與值比較子,從指定的項目範圍,建立新的、不可變的排序字典。

CreateRange<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>)

來源:
ImmutableSortedDictionary.cs
來源:
ImmutableSortedDictionary.cs
來源:
ImmutableSortedDictionary.cs

建立不可變的排序字典,其中包含指定的項目,並使用預設的比較子。

public:
generic <typename TKey, typename TValue>
 static System::Collections::Immutable::ImmutableSortedDictionary<TKey, TValue> ^ CreateRange(System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ items);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> CreateRange<TKey,TValue> (System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
static member CreateRange : seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
Public Function CreateRange(Of TKey, TValue) (items As IEnumerable(Of KeyValuePair(Of TKey, TValue))) As ImmutableSortedDictionary(Of TKey, TValue)

類型參數

TKey

字典中儲存的索引鍵類型。

TValue

字典中儲存的值類型。

參數

items
IEnumerable<KeyValuePair<TKey,TValue>>

在字典成為不可變之前,新增至排序字典的項目。

傳回

不可變的排序字典,其中包含指定的項目。

適用於

CreateRange<TKey,TValue>(IComparer<TKey>, IEnumerable<KeyValuePair<TKey,TValue>>)

來源:
ImmutableSortedDictionary.cs
來源:
ImmutableSortedDictionary.cs
來源:
ImmutableSortedDictionary.cs

使用指定的索引鍵比較子,從指定的項目範圍,建立新的、不可變的排序字典。

public:
generic <typename TKey, typename TValue>
 static System::Collections::Immutable::ImmutableSortedDictionary<TKey, TValue> ^ CreateRange(System::Collections::Generic::IComparer<TKey> ^ keyComparer, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ items);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> CreateRange<TKey,TValue> (System.Collections.Generic.IComparer<TKey> keyComparer, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> CreateRange<TKey,TValue> (System.Collections.Generic.IComparer<TKey>? keyComparer, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
static member CreateRange : System.Collections.Generic.IComparer<'Key> * seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
Public Function CreateRange(Of TKey, TValue) (keyComparer As IComparer(Of TKey), items As IEnumerable(Of KeyValuePair(Of TKey, TValue))) As ImmutableSortedDictionary(Of TKey, TValue)

類型參數

TKey

字典中儲存的索引鍵類型。

TValue

字典中儲存的值類型。

參數

keyComparer
IComparer<TKey>

評估等式與排序索引鍵所使用的比較子實作。

items
IEnumerable<KeyValuePair<TKey,TValue>>

要新增至排序字典的項目。

傳回

新的、不可變的排序字典,其中包含指定的項目,並使用指定的索引鍵比較子。

適用於

CreateRange<TKey,TValue>(IComparer<TKey>, IEqualityComparer<TValue>, IEnumerable<KeyValuePair<TKey,TValue>>)

來源:
ImmutableSortedDictionary.cs
來源:
ImmutableSortedDictionary.cs
來源:
ImmutableSortedDictionary.cs

使用指定的索引鍵與值比較子,從指定的項目範圍,建立新的、不可變的排序字典。

public:
generic <typename TKey, typename TValue>
 static System::Collections::Immutable::ImmutableSortedDictionary<TKey, TValue> ^ CreateRange(System::Collections::Generic::IComparer<TKey> ^ keyComparer, System::Collections::Generic::IEqualityComparer<TValue> ^ valueComparer, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ items);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> CreateRange<TKey,TValue> (System.Collections.Generic.IComparer<TKey> keyComparer, System.Collections.Generic.IEqualityComparer<TValue> valueComparer, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> CreateRange<TKey,TValue> (System.Collections.Generic.IComparer<TKey>? keyComparer, System.Collections.Generic.IEqualityComparer<TValue>? valueComparer, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
static member CreateRange : System.Collections.Generic.IComparer<'Key> * System.Collections.Generic.IEqualityComparer<'Value> * seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
Public Function CreateRange(Of TKey, TValue) (keyComparer As IComparer(Of TKey), valueComparer As IEqualityComparer(Of TValue), items As IEnumerable(Of KeyValuePair(Of TKey, TValue))) As ImmutableSortedDictionary(Of TKey, TValue)

類型參數

TKey

字典中儲存的索引鍵類型。

TValue

字典中儲存的值類型。

參數

keyComparer
IComparer<TKey>

比較等式與排序索引鍵所使用的比較子實作。

valueComparer
IEqualityComparer<TValue>

用於比較值是否相等的比較子實作。

items
IEnumerable<KeyValuePair<TKey,TValue>>

在字典成為不可變之前,新增至排序字典的項目。

傳回

不可變的排序字典,其中包含指定的項目,並使用指定的比較子。

適用於