IImmutableDictionary<TKey,TValue>.AddRange 方法

定義

將指定的索引鍵/值組加入至字典中。

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

參數

pairs
IEnumerable<KeyValuePair<TKey,TValue>>

要加入的索引鍵/值組。

傳回

新的不可變字典,其中包含其他索引鍵/值組。

例外狀況

字典中已經存在指定的其中一個索引鍵,但有不同的值。

適用於