ImmutableInterlocked.TryRemove<TKey,TValue>(ImmutableDictionary<TKey,TValue>, TKey, TValue) Método
Definição
Remove o elemento com a chave especificada, se a chave existir.Removes the element with the specified key, if the key exists.
public:
generic <typename TKey, typename TValue>
static bool TryRemove(System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ % location, TKey key, [Runtime::InteropServices::Out] TValue % value);
public static bool TryRemove<TKey,TValue> (ref System.Collections.Immutable.ImmutableDictionary<TKey,TValue> location, TKey key, out TValue value);
static member TryRemove : ImmutableDictionary * 'Key * 'Value -> bool
Public Shared Function TryRemove(Of TKey, TValue) (ByRef location As ImmutableDictionary(Of TKey, TValue), key As TKey, ByRef value As TValue) As Boolean
Parâmetros de tipo
- TKey
O tipo das chaves contidas na coleção.The type of the keys contained in the collection.
- TValue
O tipo dos valores contidos na coleção.The type of the values contained in the collection.
Parâmetros
- location
- ImmutableDictionary<TKey,TValue>
O dicionário a ser atualizado.The dictionary to update.
- key
- TKey
A chave a ser removida.The key to remove.
- value
- TValue
Recebe o valor do item removido, se o dicionário não estiver vazio.Receives the value of the removed item, if the dictionary is not empty.
Retornos
true se a chave for encontrada e removida; caso contrário, false.true if the key was found and removed; otherwise, false.