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

定义

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

C#
System.Collections.Immutable.IImmutableDictionary<TKey,TValue> IImmutableDictionary<TKey,TValue>.SetItems (System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);

参数

items
IEnumerable<KeyValuePair<TKey,TValue>>

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

返回

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

实现

适用于

产品 版本
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
UWP 10.0