[This is preliminary documentation and is subject to change.]

Removes all items that matches given predicate

Namespace: Tools.CollectionsT.GenericT
Assembly: Tools (in Tools.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
public virtual void RemoveAll(
	Predicate<T> Match
)
Visual Basic
Public Overridable Sub RemoveAll ( _
	Match As Predicate(Of T) _
)
Visual C++
public:
virtual void RemoveAll(
	Predicate<T>^ Match
)
F#
abstract RemoveAll : 
        Match:Predicate<'T> -> unit 
override RemoveAll : 
        Match:Predicate<'T> -> unit 
JScript
public function RemoveAll(
	Match : Predicate<T>
)

Parameters

Match
Type: System..::..Predicate<(Of <(<'T>)>)>
Predicate to match. If this predicate returns true, item is removed

Remarks

If any exception is thrown in or event handler no item is removed (collection stays unchanged)

Exceptions

ExceptionCondition
System..::..InvalidOperationExceptionLocked is True
System..::..OperationCanceledExceptionOperation is canceled in eventhandler and CancelError is true.
System..::..ExceptionAny Exception can be thrown by event handler of the Removing event -or- Any excption may be thrown by OnRemoving(ICollection, Nullable<(Of <<'(Int32>)>>)) when AllowItemCancel is true.
System..::..ArgumentNullExceptionMatch is null

See Also