CollectionExtensions.Remove<TKey,TValue> Metoda

Definice

Pokusí se odebrat hodnotu se zadaným key z objektu 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

Parametry typu

TKey

Typ klíčů v sadě dictionary.

TValue

Typ hodnot v objektu dictionary.

Parametry

dictionary
IDictionary<TKey,TValue>

Slovník s klíči typu TKey a hodnotami typu TValue.

key
TKey

Klíč hodnoty, kterou chcete odebrat.

value
TValue

Když tato metoda vrátí true, odebraná hodnota; když tato metoda vrátí false, default hodnota pro TValue.

Návraty

true je-li hodnota nalezena v dictionarykeyzadaném ; false pokud dictionary nelze najít hodnotu přidruženou k zadanému key.

Výjimky

dictionary je null.

Platí pro