CollectionExtensions.Remove<TKey,TValue>(IDictionary<TKey,TValue>, TKey, TValue) Methode
Definition
Versucht, den Wert mit dem angegebenen key
aus dem dictionary
zu entfernen.Tries to remove the value with the specified key
from the dictionary
.
public:
generic <typename TKey, typename TValue>
[System::Runtime::CompilerServices::Extension]
static bool Remove(System::Collections::Generic::IDictionary<TKey, TValue> ^ dictionary, TKey key, [Runtime::InteropServices::Out] TValue % value);
public static bool Remove<TKey,TValue> (this System.Collections.Generic.IDictionary<TKey,TValue> dictionary, TKey key, out TValue value);
static member Remove : System.Collections.Generic.IDictionary<'Key, 'Value> * 'Key * 'Value -> bool
<Extension()>
Public Function Remove(Of TKey, TValue) (dictionary As IDictionary(Of TKey, TValue), key As TKey, ByRef value As TValue) As Boolean
Typparameter
- TKey
Der Typ der Schlüssel in einem dictionary
.The type of the keys in the dictionary
.
- TValue
Der Typ der Werte in dictionary
.The type of the values in the dictionary
.
Parameter
- dictionary
- IDictionary<TKey,TValue>
Ein Wörterbuch mit Schlüsseln vom Typ TKey
und Werten vom Typ TValue
.A dictionary with keys of type TKey
and values of type TValue
.
- key
- TKey
Der Schlüssel des zu entfernenden Werts.The key of the value to remove.
- value
- TValue
Wenn diese Methode true
zurückgibt, der entfernte Wert. Wenn diese Methode false
zurückgibt, der default
-Wert für TValue
.When this method returns true
, the removed value; when this method returns false
, the default
value for TValue
.
Gibt zurück
true
, wenn ein Wert im dictionary
mit dem angegebenen key
gefunden wird; false
, wenn das dictionary
einen Wert nicht finden kann, der dem angegebenen key
zugeordnet ist.true
when a value is found in the dictionary
with the specified key
; false
when the dictionary
cannot find a value associated with the specified key
.
Ausnahmen
dictionary
ist null
.dictionary
is null
.