語言

ImmutableDictionary<TKey,TValue>.SetItems 方法

定義

在不可變字典中設定指定的索引鍵/值組,可能會覆寫索引鍵的現有值。

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

參數

items
IEnumerable<KeyValuePair<TKey,TValue>>

在字典中設定鍵值對。 如果字典中已有任何鍵,此方法會覆蓋它們之前的值。

傳回

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

適用於