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

Returns the index of the first occurrence in a sequence by using a specified IEqualityComparer.

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

Syntax


public static int IndexOf<TSource>(
	IEnumerable<TSource> list,
	TSource value,
	IEqualityComparer<TSource> comparer
)
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
comparer
Type: IEqualityComparer<(Of <(<'TSource>)>)>
An equality comparer to compare values.

Return Value

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