ICollection<T>.MoveTo(ICollection<T>,TPredicate<T>) Method
Moves the elements of the ICollection<T> that are matching the specified predicate to the specified collection.
public function MoveTo(const collection: ICollection<T>; const predicate: TPredicate<T>): Integer; overload;
Parameters
- collection
- Type: ICollection<T>
- predicate
- Type: TPredicate<T>
Return Value
Type: Integer
The number of elements that were moved.
This internally uses Extract to make sure that objects from a list with OwnsObject are not getting destroyed.