語言

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原始 中找不到 key,此方法也會回傳IDictionary<TKey,TValue>。

實作

例外狀況

key 是 null。

適用於

另請參閱