IList: IndexOf

IndexOf

Returns the index of the value within the list.



 Public Function IndexOf(
	  ByRef Value As Variant,
	  Optional ByVal Comparer As IComparer ) As Long

Parameters

Value
[ByRef] Variant. The value to find the index of in the list.
Comparer
[ByVal] Optional. IComparer. A custom comparer used for comparing values in the list to the value being sought.

Return Values

Long -  The index the value was found, or -1 if the value was not found.

Remarks

In general, -1 is returned for an unfound value. If the lowerbound of the underlying list is not 0, then the return value should be the lowerbound-1 for values not found.

See Also

Project VBCorLib Overview Class IList Overview IList Properties IList Methods GetEnumerator Insert