CollectionExtensions.Remove<TKey,TValue> Método

Definición

Intenta quitar el valor con el especificado key de .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

Parámetros de tipo

TKey

Tipo de las claves de .dictionary

TValue

Tipo de los valores de .dictionary

Parámetros

dictionary
IDictionary<TKey,TValue>

Diccionario con claves de tipo TKey y valores de tipo TValue.

key
TKey

Clave del valor que se va a quitar.

value
TValue

Cuando este método devuelve true, el valor quitado; cuando este método devuelve false, el default valor de TValue.

Devoluciones

true cuando se encuentra un valor en con dictionary el especificado key; false cuando no dictionary encuentra un valor asociado con el especificado key.

Excepciones

dictionary es null.

Se aplica a