CollectionExtensions.Remove<TKey,TValue> Método

Definição

Tenta remover o valor com o key especificado 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 em dictionary.

Parâmetros

dictionary
IDictionary<TKey,TValue>

Um dicionário com chaves do 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 valor default de TValue.

Retornos

Boolean

true quando um valor é encontrado no dictionary com o key especificado; false quando o dictionary não pode localizar um valor associado ao key especificado.

Exceções

dictionary é null.

Aplica-se a