Click or drag to resize
OrderedBagTViewAdd Method
Adds a new item to the bag underlying this View. If the bag already contains an item equal to item, that item is replaces with item. If item is outside the range of this view, an InvalidOperationException is thrown.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public override sealed void Add(
	T item
)

Parameters

item
Type: T
The item to add.

Return Value

Type: 
True if the bag already contained an item equal to item (which was replaced), false otherwise.

Implements

ICollectionTAdd(T)
Remarks

Equality between items is determined by the comparison instance or delegate used to create the bag.

Adding an item takes time O(log N), where N is the number of items in the bag.

See Also