CollectionExtensions.Remove<TKey,TValue> Metoda

Definicja

Próbuje usunąć wartość z określoną key wartością z .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 kluczy w pliku dictionary.

TValue

Typ wartości w obiekcie dictionary.

Parametry

dictionary
IDictionary<TKey,TValue>

Słownik z kluczami typu TKey i wartościami typu TValue.

key
TKey

Klucz wartości do usunięcia.

value
TValue

Gdy ta metoda zwraca truewartość , usuniętą wartość, gdy ta metoda zwraca falsewartość , default wartość .TValue

Zwraca

true gdy wartość zostanie znaleziona w dictionary obiekcie z określonym key; false gdy dictionary nie można odnaleźć wartości skojarzonej z określonym key.

Wyjątki

dictionary to null.

Dotyczy