Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

Bag<(Of <(<'T>)>)>..::..NumberOfCopies Method

Returns the number of copies of item in the bag.

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


public int NumberOfCopies(
	T item
)
Public Function NumberOfCopies ( _
	item As T _
) As Integer
public:
int^ NumberOfCopies(
	T item
)

Parameters

item
Type: T
The item to search for in the bag.

Return Value

The number of items in the bag that compare equal to item.

Remarks


NumberOfCopies() takes approximately constant time, no matter how many items are stored in the bag.