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

參數

傳回

Boolean

如果 true 已成功從 keyValuePair 中移除,則為 ICollection<T>,否則為 falsetrue 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>.

實作

適用於