ImmutableDictionary<TKey,TValue>.Remove(TKey) 方法

定义

从不可变字典中移除具有指定键的元素。Removes the element with the specified key from the immutable dictionary.

public:
 System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ Remove(TKey key);
public System.Collections.Immutable.ImmutableDictionary<TKey,TValue> Remove (TKey key);
member this.Remove : 'Key -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
Public Function Remove (key As TKey) As ImmutableDictionary(Of TKey, TValue)

参数

key
TKey

要移除的元素的键。The key of the element to remove.

返回

已移除指定元素的新不可变字典;如果在字典中找不到指定的键,则为此实例。A new immutable dictionary with the specified element removed; or this instance if the specified key cannot be found in the dictionary.

适用于