語言

ImmutableSortedDictionary<TKey,TValue>.AddRange 方法

定義

將特定索引鍵/值組加入至不可變的排序字典。

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

參數

items
IEnumerable<KeyValuePair<TKey,TValue>>

要加的鍵值對。

傳回

一個新的不可變字典,包含額外的鍵值對。

例外狀況

其中一個給定的鍵已經存在於字典中,但值不同。

適用於