Adds a new item to the bag. Since bags can contain duplicate items, the item
is added even if the bag already contains an item equal to item. In
this case, the new item is placed after all equal items already present in the bag.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic override sealed void Add(
T item
)
public:
virtual void Add(
T item
) override sealed
Parameters
- item
- Type: T
The item to add to the bag.
Implements
ICollectionTAdd(T)
RemarksAdding an item takes time O(log N), where N is the number of items in the bag.
See Also