Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

OrderedBag<(Of <(<'T>)>)>..::..LastIndexOf Method

Get the index of the given item in the sorted order. The smallest item has index 0, the next smallest item has index 1, and the largest item has index Count-1. If multiple equal items exist, the largest index of the equal items is returned.

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

Syntax


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

Parameters

item
Type: T
The item to get the index of.

Return Value

The index of the last item in the sorted bag equal to item, or -1 if the item is not present in the set.

Remarks


Finding the index takes time O(log N), which N is the number of items in the set.