IImmutableDictionary<TKey,TValue>.SetItems 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在不可变字典中设置指定的键/值对,可能覆盖键的现有值。
public:
System::Collections::Immutable::IImmutableDictionary<TKey, TValue> ^ SetItems(System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ items);
public System.Collections.Immutable.IImmutableDictionary<TKey,TValue> SetItems(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
abstract member SetItems : seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Immutable.IImmutableDictionary<'Key, 'Value>
Public Function SetItems (items As IEnumerable(Of KeyValuePair(Of TKey, TValue))) As IImmutableDictionary(Of TKey, TValue)
参数
- items
- IEnumerable<KeyValuePair<TKey,TValue>>
要在字典中设置的键/值对。 如果字典中已有任何键,此方法将覆盖其以前的值。
返回
包含指定键/值对的新不可变字典。