Click or drag to resize

RankedBagTRemove Method (T, Int32)

Removes a supplied number of occurrences of the supplied item from the bag.

Namespace:  Kaos.Collections
Assembly:  KaosCollections (in KaosCollections.dll) Version: 4.2.0.0
Syntax
C#
public int Remove(
	T item,
	int count
)

Parameters

item
Type: T
The item to remove.
count
Type: SystemInt32
The number of occurrences to remove.

Return Value

Type: Int32
The number of occurrences actually removed.
Exceptions
ExceptionCondition
ArgumentExceptionWhen count is less than zero.
Remarks

For items with multiple occurrences, lowest indexed items are removed first.

This is a O(log n) operation n is Count.

See Also