ImmutableDictionary<TKey,TValue>.IImmutableDictionary<TKey,TValue>.SetItems 方法

定义

将给定的一组键/值对应用于不可变的字典,并替换生成的字典中任何存在冲突的键。

 virtual System::Collections::Immutable::IImmutableDictionary<TKey, TValue> ^ System.Collections.Immutable.IImmutableDictionary<TKey,TValue>.SetItems(System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ items) = System::Collections::Immutable::IImmutableDictionary<TKey, TValue>::SetItems;
System.Collections.Immutable.IImmutableDictionary<TKey,TValue> IImmutableDictionary<TKey,TValue>.SetItems (System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
abstract member System.Collections.Immutable.IImmutableDictionary<TKey,TValue>.SetItems : seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Immutable.IImmutableDictionary<'Key, 'Value>
override this.System.Collections.Immutable.IImmutableDictionary<TKey,TValue>.SetItems : seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Immutable.IImmutableDictionary<'Key, 'Value>
Function SetItems (items As IEnumerable(Of KeyValuePair(Of TKey, TValue))) As IImmutableDictionary(Of TKey, TValue) Implements IImmutableDictionary(Of TKey, TValue).SetItems

参数

items
IEnumerable<KeyValuePair<TKey,TValue>>

要在映射中设置的键/值对。 与现有键冲突的任何键都将替换之前的值。

返回

带有已更新的键/值对的不可变字典的副本。

实现

适用于