SortedList<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Remove(KeyValuePair<TKey,TValue>) 方法
定义
从 ICollection<T> 中移除特定键/值对的第一个匹配项。Removes the first occurrence of a specific key/value pair from the ICollection<T>.
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> 移除的 ICollection<T>。The KeyValuePair<TKey,TValue> to remove from the ICollection<T>.
返回
如果从 true
中成功移除 keyValuePair
,则为 ICollection<T>;否则为 false
。true
if keyValuePair
was successfully removed from the ICollection<T>; otherwise, false
. 如果在原始 false
中没有找到 keyValuePair
,此方法也会返回 ICollection<T>。This method also returns false
if keyValuePair
was not found in the original ICollection<T>.