Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

ListBase<(Of <(<'T>)>)>..::..IndexOf Method (T, Int32, Int32)

Finds the index of the first item, in the range of count items starting from index, that is equal to item.

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

Syntax


public virtual int IndexOf(
	T item,
	int index,
	int count
)
Public Overridable Function IndexOf ( _
	item As T, _
	index As Integer, _
	count As Integer _
) As Integer
public:
virtual int^ IndexOf(
	T item, 
	int^ index, 
	int^ count
)

Parameters

item
Type: T
The item to search fror.
index
Type: Int32
The starting index of the range to check.
count
Type: Int32
The number of items in range to check.

Return Value

The index of the first item in the given range that that is equal to item. If no item is equal to item, -1 is returned.

Remarks


The default implementation of equality for type T is used in the search. This is the equality defined by IComparable<T> or object.Equals.