Επεξεργασία

Κοινή χρήση μέσω


ConcurrentDictionary<TKey,TValue>.AlternateLookup<TAlternateKey>.TryRemove Method

Definition

Overloads

TryRemove(TAlternateKey, TValue)

Removes the value with the specified alternate key from the Dictionary<TKey,TValue>,

and copies the element to the value parameter.

TryRemove(TAlternateKey, TKey, TValue)

Removes the value with the specified alternate key from the Dictionary<TKey,TValue>,

and copies the associated key and element to the value parameter.

TryRemove(TAlternateKey, TValue)

Removes the value with the specified alternate key from the Dictionary<TKey,TValue>,

and copies the element to the value parameter.

public:
 bool TryRemove(TAlternateKey key, [Runtime::InteropServices::Out] TValue % value);
public bool TryRemove (TAlternateKey key, out TValue value);
member this.TryRemove : 'AlternateKey * 'Value -> bool
Public Function TryRemove (key As TAlternateKey, ByRef value As TValue) As Boolean

Parameters

key
TAlternateKey

The alternate key of the element to remove.

value
TValue

The removed element.

Returns

true if the element is successfully found and removed; otherwise, false.

Exceptions

key is null.

Applies to

TryRemove(TAlternateKey, TKey, TValue)

Removes the value with the specified alternate key from the Dictionary<TKey,TValue>,

and copies the associated key and element to the value parameter.

public:
 bool TryRemove(TAlternateKey key, [Runtime::InteropServices::Out] TKey % actualKey, [Runtime::InteropServices::Out] TValue % value);
public bool TryRemove (TAlternateKey key, out TKey actualKey, out TValue value);
member this.TryRemove : 'AlternateKey * 'Key * 'Value -> bool
Public Function TryRemove (key As TAlternateKey, ByRef actualKey As TKey, ByRef value As TValue) As Boolean

Parameters

key
TAlternateKey

The alternate key of the element to remove.

actualKey
TKey

The removed key.

value
TValue

The removed element.

Returns

true if the element is successfully found and removed; otherwise, false.

Exceptions

key is null.

Applies to