Click or drag to resize
BagTRemoveAllCopies 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.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public int RemoveAllCopies(
	T item
)

Parameters

item
Type: T
The item to remove.

Return Value

Type: Int32
The number of copies of item that were found and removed.
Remarks

Equality between items is determined by the comparer instance 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