ImmutableSortedDictionary<TKey,TValue>.AddRange 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將特定索引鍵/值組加入至不可變的排序字典。
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>>
要加的鍵值對。
傳回
一個新的不可變字典,包含額外的鍵值對。
例外狀況
其中一個給定的鍵已經存在於字典中,但值不同。