KGy SOFT

CacheTKey, TValueRemove Method

KGy SOFT Core Libraries Help

Namespace:  KGySoft.Collections
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0
Syntax

public bool Remove(
	TKey key
)

Parameters

key
Type: TKey
Key of the item to remove.

Return Value

Type: 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)
Exceptions

ExceptionCondition
ArgumentNullExceptionkey is .
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.

See Also

Reference