ConcurrentDictionary<TKey,TValue>.IDictionary<TKey,TValue>.Remove 方法

定义

从 中移除具有指定键的 IDictionary<TKey,TValue>元素。

 virtual bool System.Collections.Generic.IDictionary<TKey,TValue>.Remove(TKey key) = System::Collections::Generic::IDictionary<TKey, TValue>::Remove;
bool IDictionary<TKey,TValue>.Remove(TKey key);
abstract member System.Collections.Generic.IDictionary<TKey,TValue>.Remove : 'Key -> bool
override this.System.Collections.Generic.IDictionary<TKey,TValue>.Remove : 'Key -> bool
Function Remove (key As TKey) As Boolean Implements IDictionary(Of TKey, TValue).Remove

参数

key
TKey

要删除的元素的键。

返回

true 如果已成功删除元素,则为 ;否则,为 false. 此方法还会返回false在原始IDictionary<TKey,TValue>文件中找不到时key

实现

例外

keynull

适用于

另请参阅