Click or drag to resize

RankedBagTAdd Method (T)

Adds an item to the bag.

Namespace:  Kaos.Collections
Assembly:  KaosCollections (in KaosCollections.dll) Version: 4.2.0.0
Syntax
C#
public bool Add(
	T item
)

Parameters

item
Type: T
The item to add.

Return Value

Type: Boolean
true if this is the first occurrence of this item; otherwise false.
Exceptions
ExceptionCondition
ArgumentExceptionWhen no comparer is available.
Remarks

If the supplied item already occurs in the bag then the new item is added sequentially following the old items.

This is a O(log n) operation.

See Also