ImmutableDictionary<TKey,TValue>.AddRange 方法

定義

將指定的機碼值組加入不可變字典。

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

參數

pairs
IEnumerable<KeyValuePair<TKey,TValue>>

要加入的索引鍵/值組。

傳回

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

例外狀況

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

適用於