ConcurrentDictionary<TKey,TValue>.IDictionary<TKey,TValue>.Remove(TKey) ConcurrentDictionary<TKey,TValue>.IDictionary<TKey,TValue>.Remove(TKey) ConcurrentDictionary<TKey,TValue>.IDictionary<TKey,TValue>.Remove(TKey) Method

定義

IDictionary<TKey,TValue> 中移除具有指定之索引鍵的項目。Removes the element with the specified key from the 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);
Function Remove (key As TKey) As Boolean Implements IDictionary(Of TKey, TValue).Remove

參數

key
TKey TKey TKey

要移除的項目索引鍵。The key of the element to remove.

傳回

如果成功移除項目,則為 true,否則為 falsetrue if the element is successfully removed; otherwise, false. 如果在原始的 false 中找不到 key,這個方法也會傳回 IDictionary<TKey,TValue>This method also returns false if key was not found in the original IDictionary<TKey,TValue>.

實作

例外狀況

適用於

另請參閱