Share via


Dictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Remove Metode

Definisi

Menghapus kunci dan nilai dari kamus.

 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

Parameter

keyValuePair
KeyValuePair<TKey,TValue>

Struktur KeyValuePair<TKey,TValue> yang mewakili kunci dan nilai yang akan dihapus dari Dictionary<TKey,TValue>.

Mengembalikan

true jika kunci dan nilai yang diwakili oleh keyValuePair berhasil ditemukan dan dihapus; jika tidak, false. Metode ini mengembalikan false jika keyValuePair tidak ditemukan di ICollection<T>.

Penerapan

Berlaku untuk