KGy SOFT

CircularSortedListTKey, TValueRemove Method

KGy SOFT Core Libraries Help

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

public bool Remove(
	TKey key
)

Parameters

key
Type: TKey
The key of the element to remove.

Return Value

Type: Boolean
 if the element is successfully removed; otherwise, .

Implements

IDictionaryTKey, TValueRemove(TKey)
Exceptions

ExceptionCondition
ArgumentNullExceptionkey is .
Remarks

This method performs a binary search; however, the elements are moved up to fill in the open spot. So this method is an O(log n) operation, when the first or last element is removed; otherwise, O(n), where n is Count. If it is known that the first or last element should be removed, use RemoveAt(Int32) instead, which is an O(1) operation in this case.
See Also

Reference