AddRepresentative Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Adds a new item to the bag. Since bags can contain duplicate items, the item is added even if the bag already contains an item equal to item. In this case (unlike Add), the new item becomes the representative item.

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

Syntax

C#
public void AddRepresentative(
	T item
)
Visual Basic (Declaration)
Public Sub AddRepresentative ( _
	item As T _
)
Visual C++
public:
void AddRepresentative (
	T item
)

Parameters

item
T
The item to add to the bag.

Remarks

Adding an item takes approximately constant time, regardless of the number of items in the bag.

See Also