ImmutableSortedDictionary<TKey,TValue>.Add(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.
Adiciona um elemento com a chave e valor especificados ao dicionário ordenado imutável.
public:
System::Collections::Immutable::ImmutableSortedDictionary<TKey, TValue> ^ Add(TKey key, TValue value);
public System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> Add(TKey key, TValue value);
member this.Add : 'Key * 'Value -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
Public Function Add (key As TKey, value As TValue) As ImmutableSortedDictionary(Of TKey, TValue)
Parâmetros
- key
- TKey
A chave da entrada para acrescentar.
- value
- TValue
O valor da entrada a acrescentar.
Devoluções
Um novo dicionário ordenado imutável que contém o par chave/valor adicional.
Exceções
A chave dada já existe no dicionário, mas tem um valor diferente.
Observações
Se o par chave/valor dado já existir no dicionário, a instância existente do dicionário é devolvida.