Click or drag to resize

ListExtensionsIndexOfLastT Method

Gets the index of the last item in list that fulfills the predicate predicate.

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
public static int IndexOfLast<T>(
	this IList<T> list,
	Func<T, int, bool> predicate
)

Parameters

list  IListT
The list.
predicate  FuncT, Int32, Boolean
The predicate function. The first argument is the item, the second argument is the item's index in the list. If the return value is true, the index of this item is returned.

Type Parameters

T
Type of items in the list.

Return Value

Int32
Index of the last item in list that fulfills the predicate, or a value of -1 if no such an item could be found.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IListT. 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