Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

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

Declaration

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

Summary

Determines whether all elements of a sequence satisfy 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 every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false.