RemoveAll<T>(ICollection<T>, Func<T, bool>) Method
Removes all items that match a predicate from a collection.
Namespace
Statiq.Common
Containing Type
ICollectionExtensions

Syntax

public static int RemoveAll<T>(this ICollection<T> collection, Func<T, bool> match)

Type Parameters

Name Description
T The type of the collection items.

Parameters

Name Type Description
collection ICollection<T> The collection to remove items from.
match Func<T, bool> The predicate (return true to remove the item).

Return Value

Type Description
int The number of items removed.