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>

實作

例外狀況

keynull

適用於

另請參閱