ThreadSafeDictionaryTKey, TValueTryRemove(TKey, TValue) Method

Tries to remove and return the value with the specified key from the ThreadSafeDictionaryTKey, TValue.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public bool TryRemove(
	TKey key,
	out TValue value
)

Parameters

key  TKey
Key of the item to remove.
value  TValue
When this method returns, contains the value removed from the ThreadSafeDictionaryTKey, TValue, or the default value of the TValue type if key does not exist.

Return Value

Boolean
if the element is successfully removed; otherwise, .

Exceptions

See Also