ListExtensions.Where<T>

Extension Method in ListExtensions

Declaration

public static List<T> Where<T>(this List<T> list, Predicate<T> predicate)

Description

Filters the list to only contain items that satisfy a predicate.

Type Parameters

TThe type of the list.

Parameters

listThe list to filter.
predicateThe predicate to use.

Returns

ListTA new list with the filtered items removed.