EyeshotCollection<T>.FindLastIndex (Int32, Int32, Predicate<T>) Method

Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in this collection that contains the specified number of elements and ends at the specified index.
Public Function FindLastIndex( _ 
ByVal startIndex As Integer, _ 
ByVal count As Integer, _ 
ByVal match As Predicate(Of T) _ 
) As Integer
This language is not supported or no code example is available.
public int FindLastIndex( 
int startIndex
int count
Predicate<T> match 
)
This language is not supported or no code example is available.

Parameters

startIndex
int

The zero-based starting index of the backward search.

count
int

The number of elements in the section to search.

match
Predicate<T>

The predicate delegate that defines the conditions of the element to search for.

Return Value

int

The zero-based index of the last occurrence of an element that matches the conditions defined by match, if found; otherwise, -1.

Exception type Condition

ArgumentNullException

match is null.

ArgumentOutOfRangeException

startIndex is outside the range of valid indexes for this collection. -or- count is less than 0. -or- startIndex and count do not specify a valid section in this collection.

.NET Framework

Supported in: 4.5, 4.6, 4.7

In this article

Definition