CircularSortedListTKey, TValueRemove Method
Namespace: KGySoft.CollectionsAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
public bool Remove(
TKey key
)
Public Function Remove (
key As TKey
) As Boolean
public:
virtual bool Remove(
TKey key
) sealed
abstract Remove :
key : 'TKey -> bool
override Remove :
key : 'TKey -> bool
- key TKey
- The key of the element to remove.
Boolean if the element is successfully removed; otherwise,
.
IDictionaryTKey, TValueRemove(TKey) 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.