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>键和值的结构。

返回

如果成功找到并删除了由 其表示的键和值,则为 ;否则为 < a1/ >。 如果在 .. 中false找不到此方法,keyValuePairICollection<T>则返回此方法。

实现

适用于