Click or drag to resize
OrderedBagTGetFirst Method
Returns the first item in the bag: the item that would appear first if the bag was enumerated. This is also the smallest item in the bag.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public T GetFirst()

Return Value

Type: T
The first item in the bag. If more than one item is smallest, the first one added is returned.
Exceptions
ExceptionCondition
InvalidOperationExceptionThe bag is empty.
Remarks
GetFirst() takes time O(log N), where N is the number of items in the bag.
See Also