IImmutableDictionary<TKey,TValue>.SetItem(TKey, TValue) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Define a chave e o valor especificados no dicionário imutável, possivelmente sobrescrevendo um valor existente para a chave.
public:
System::Collections::Immutable::IImmutableDictionary<TKey, TValue> ^ SetItem(TKey key, TValue value);
public System.Collections.Immutable.IImmutableDictionary<TKey,TValue> SetItem(TKey key, TValue value);
abstract member SetItem : 'Key * 'Value -> System.Collections.Immutable.IImmutableDictionary<'Key, 'Value>
Public Function SetItem (key As TKey, value As TValue) As IImmutableDictionary(Of TKey, TValue)
Parâmetros
- key
- TKey
A chave da entrada para acrescentar.
- value
- TValue
O valor chave a definir.
Devoluções
Um novo dicionário imutável que contém o par chave/valor especificado.
Observações
Se o par chave/valor especificado já existir no dicionário, este método devolve a instância existente. Se a chave já existir mas tiver um valor diferente, este método devolve uma nova instância do dicionário com o valor sobrescrito.