語言

ImmutableSortedDictionary.CreateRange 方法

定義

多載

名稱 Description
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
來源:
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
來源:
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
來源:
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>>

在排序字典變為不可變之前,要加入的項目。

傳回

一個不可變的排序字典,包含指定的項目並使用指定的比較器。

適用於