Skip to main content

Collection<T>.FindAll(Predicate<T>) Method

Returns all elements that match the conditions defined by the specified predicate.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web


public IEnumerable<T> FindAll(
    Predicate<T> match


Name Type Description
match Predicate<T>

A delegate that defines the conditions of the elements to search for.


Type Description

A collection of the elements that match the conditions defined by the predicate.


The FindAll method individually passes elements of the current collection to a predicate, and returns a collection of elements that match the predicate. A predicate is a delegate to a method that returns true if the object passed to it matches the conditions defined in the delegate; otherwise the method returns false.


The code sample below demonstrates how you can use the FindAll method to find all items that meet custom conditions within a collection. In this example, the method finds all items that start from letter “A”.

using DevExpress.Web.ASPxTitleIndex;
protected void ASPxButton1_Click(object sender, EventArgs e) {
     IEnumerable<TitleIndexItem> List = ASPxTitleIndex1.Items.FindAll(StartWith);
public bool StartWith(TitleIndexItem Item) {
     return Item.Text.StartsWith("A");
See Also