Searches the bag for one item equal to item, and if found,
removes it from the bag. If not found, the bag is unchanged. If more than one item
equal to item, the item that was last inserted is removed.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic override sealed bool Remove(
T item
)
public:
virtual bool Remove(
T item
) override sealed
Parameters
- item
- Type: T
The item to remove.
Return Value
Type:
BooleanTrue if
item was found and removed. False if
item was not in the bag.
Implements
ICollectionTRemove(T)
RemarksEquality between items is determined by the comparison instance or delegate used
to create the bag.
Removing an item from the bag takes time O(log N), where N is the number of items in the bag.
See Also