BagTAddRepresentative Method |
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 (unlike Add), the new item becomes the representative item.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic void AddRepresentative(
T item
)
public:
void AddRepresentative(
T item
)
Parameters
- item
- Type: T
The item to add to the bag.
RemarksAdding an item takes approximately constant time, regardless of the number of items in the bag.
See Also