Dictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Remove Метод

Определение

Удаляет ключ и значение из словаря.

 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

Параметры

keyValuePair
KeyValuePair<TKey,TValue>

Структура KeyValuePair<TKey,TValue>, представляющая ключ и значение, которые требуется удалить из словаря Dictionary<TKey,TValue>.

Возвращаемое значение

Boolean

Значение true, если ключ и значение, представленные структурой keyValuePair, успешно найдены и удалены, в противном случае — false. Этот метод возвращает значение false, если ключ keyValuePair не удалось найти в ICollection<T>.

Реализации

Применяется к