CollectionExtensions.Remove<TKey,TValue> Método

Definição

Tenta remover o valor com o especificado key do 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

O tipo das chaves no dictionary.

TValue

O tipo dos valores na dictionary.

Parâmetros

dictionary
IDictionary<TKey,TValue>

Um dicionário com chaves de tipo TKey e valores do tipo TValue.

key
TKey

A chave do valor a ser removido.

value
TValue

Quando esse método retorna true, o valor removido; quando esse método retorna false, o default valor para TValue.

Retornos

true quando um valor é encontrado no dictionary com o especificado key; false quando não dictionary é possível encontrar um valor associado ao especificado key.

Exceções

dictionary é null.

Aplica-se a