ImmutableInterlocked.TryRemove<TKey,TValue> Metod

Definition

Tar bort elementet med den angivna nyckeln, om nyckeln finns.

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

Typparametrar

TKey

Typen av nycklar som finns i samlingen.

TValue

Typen av värden som finns i samlingen.

Parametrar

location
ImmutableDictionary<TKey,TValue>

Ordlistan som ska uppdateras.

key
TKey

Nyckeln som ska tas bort.

value
TValue

Tar emot värdet för det borttagna objektet om ordlistan inte är tom.

Returer

trueom nyckeln hittades och togs bort. annars . false

Gäller för