Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: bool Any<T>(this IEnumerable<T>, Func<T, int, bool>)

Declaration

public static bool Any<T>(
    this IEnumerable<T> source,
    Func<T, int, bool> predicate
)

Summary

Determines whether any element of a sequence satisfies a condition by incorporating the element's index.

Generic type parameters

T The type of the elements of source.

Parameters

this IEnumerable<T>source An IEnumerable<T> that contains the elements to apply the predicate to.
Func<T, int, bool>predicate A function to test each element for a condition; the second parameter of the function represents the index of the source element.

Returns

true if any elements in the source sequence pass the test in the specified predicate; otherwise, false.