Summary
Removes all items that match a predicate from a collection.
- Assembly
- Wyam
.Common .dll - Namespace
- Wyam
.Common .Util - Containing Type
- CollectionExtensions
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 |
The collection to remove items from. |
match | Func |
The predicate (return true to remove the item). |
Return Value
Type | Description |
---|---|
int | The number of items removed. |