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>>

要在字典中設定的索引鍵/值組。 如果任何索引鍵已經存在字典中,則此方法將會覆寫其先前的值

傳回

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

適用於