AlgorithmsRemoveWhereT Method |
Removes all the items in the collection that satisfy the condition
defined by predicate.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static ICollection<T> RemoveWhere<T>(
ICollection<T> collection,
Predicate<T> predicate
)
public:
generic<typename T>
static ICollection<T>^ RemoveWhere(
ICollection<T>^ collection,
Predicate<T>^ predicate
)
Parameters
- collection
- Type: System.Collections.GenericICollectionT
The collection to check all the items in. - predicate
- Type: SystemPredicateT
A delegate that defines the condition to check for.
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:X3Platform.Collections.Algorithms.RemoveWhere``1(System.Collections.Generic.ICollection{``0},System.Predicate{``0})"]
Return Value
Type:
ICollectionTReturns a collection of the items that were removed. This collection contains the
items in the same order that they orginally appeared in
collection.
RemarksIf the collection if an array or implements IList<T>, an efficient algorithm that
compacts items is used. If not, then ICollection<T>.Remove is used
to remove items from the collection. If the collection is an array or fixed-size list,
the non-removed elements are placed, in order, at the beginning of
the list, and the remaining list items are filled with a default value (0 or null).
See Also