ConcurrentDictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Remove(KeyValuePair<TKey,TValue>) Method

Definition

将指定的键/值对从集合中移除。Removes the specified key/value pair from the collection.

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

Parameters

Returns

Boolean

如果已成功删除该元素,则为 true;否则为 falsetrue if the element is successfully removed; otherwise, false. 如果在原始 ICollection<T> 中找不到 key,此方法也会返回 false。This method also returns false if key was not found in the original ICollection<T>.

Implements

Applies to

See also