CacheTKey, TValueRemove Method

Removes the value with the specified key from the CacheTKey, TValue.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public bool Remove(
	TKey key
)

Parameters

key  TKey
Key of the item to remove.

Return Value

Boolean
if the element is successfully removed; otherwise, . This method also returns if key was not found in the CacheTKey, TValue.

Implements

IDictionaryTKey, TValueRemove(TKey)

Remarks

If the CacheTKey, TValue does not contain an element with the specified key, the CacheTKey, TValue remains unchanged. No exception is thrown.

This method approaches an O(1) operation.

Exceptions

See Also