Click or drag to resize
EnumerableExtensionsIndexOfT Method
Returns the index of the first element that matches the given predicate.

Namespace: SphinxConnector.FluentApi.Util
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 3.12.6
Syntax
public static int IndexOf<T>(
	this IEnumerable<T> enumerable,
	Func<T, bool> predicate
)

Parameters

enumerable
Type: System.Collections.GenericIEnumerableT
The elements to check.
predicate
Type: SystemFuncT, Boolean
A function to test each element for a condition.

Type Parameters

T
The type of the elements of enumerable.

Return Value

Type: Int32
The index of the first matching element, or -1 if no element matches.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also