ConcurrentDictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Remove Metoda

Definicja

Usuwa określoną parę klucz/wartość z kolekcji.

 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

Parametry

keyValuePair
KeyValuePair<TKey,TValue>

Element KeyValuePair<TKey,TValue> do usunięcia.

Zwraca

Wartość true, jeśli element zostanie pomyślnie usunięty; w przeciwnym razie — false. Ta metoda zwraca również wartość false, jeśli key nie znaleziono w oryginalnym ICollection<T>obiekcie .

Implementuje

Wyjątki

Właściwość Key to keyValuePairnull.

Dotyczy

Zobacz też