OrderedBagTRemoveAllCopies Method |
Searches the bag for all items equal to item, and
removes all of them from the bag. If not found, the bag is unchanged.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic int RemoveAllCopies(
T item
)
public:
int RemoveAllCopies(
T item
)
Parameters
- item
- Type: T
The item to remove.
Return Value
Type:
Int32The number of copies of
item that were found and removed.
RemarksEquality between items is determined by the comparison instance or delegate used
to create the bag.
RemoveAllCopies() takes time O(M log N), where N is the total number of items in the bag, and M is
the number of items equal to item.
See Also