klyn.collections.IList.indexOf
method
public indexOf(item as T, start as Int = 0) as Int
Description

Returns the first index of the given element.

Parameters
ParameterDescription
itemThe element to search for.
startZero-based index where the search starts.
Returns

The first matching index, or -1 when the element is absent.

Example
import klyn.collections

values as IList<Int> = [10, 20, 10]
print(values.indexOf(10))     # 0
print(values.indexOf(10, 1))  # 2