BagTGetRepresentativeItem Method |
Returns the representative item stored in the bag that is equal to
the provided item. Also returns the number of copies of the item in the bag.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic int GetRepresentativeItem(
T item,
out T representative
)
public:
int GetRepresentativeItem(
T item,
[OutAttribute] T% representative
)
Parameters
- item
- Type: T
Item to find in the bag. - representative
- Type: T
If one or more items equal to item are present in the
bag, returns the representative item. If no items equal to item are stored in the bag,
returns item.
Return Value
Type:
Int32The number of items equal to
item stored in the bag.
See Also