EnumerableExt..::..IndexOf<(Of <(<'TSource>)>)> Method (IEnumerable<(Of <(<'TSource>)>)>, TSource)

Returns the index of the first occurrence in a sequence by using the default equality comparer.

Namespace:  Core
Assembly:  Core (in Core.dll)

Syntax


public static int IndexOf<TSource>(
	IEnumerable<TSource> list,
	TSource value
)
where TSource : IEquatable<TSource>

Type Parameters

TSource
The type of the elements of source.

Parameters

list
Type: IEnumerable<(Of <(<'TSource>)>)>
A sequence in which to locate a value.
value
Type: TSource
The object to locate in the sequence

Return Value

The zero-based index of the first occurrence of value within the entire sequence, if found; otherwise, –1.