BagTChangeNumberOfCopies Method |
Changes the number of copies of an existing item in the bag, or adds the indicated number
of copies of the item to the bag.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic void ChangeNumberOfCopies(
T item,
int numCopies
)
public:
void ChangeNumberOfCopies(
T item,
int numCopies
)
Parameters
- item
- Type: T
The item to change the number of copies of. This may or may not already be present in the bag. - numCopies
- Type: SystemInt32
The new number of copies of the item.
RemarksChanging the number of copies takes approximately constant time, regardless of the number of items in the bag.
See Also