Enumerable.indexOf Method

Returns the index where the element equal to value first appears in the sequence, optionally using an equality comparer to compare the value to elements in the sequence.
 
 
Static This method is static.

Parameters

source

Type: IEnumerable
The enumerable to find the first index of value.
value

Type: Object
The value to search for in the sequence.
equalityComparer

Type: IEqualityComparer
Optional: True

Return Value


Type: Number (Integer)
The index in the sequence where the value first appears, or -1 if it is not in the sequence.