removeAll

Removes all elements from a list variable that match the contents of the specified collection, and returns true if the list changed as a result.

Syntax:

$[ScriptVariable]::removeAll(List c)

Parameters:

c (List): the collection of elements to compare.

Example:

The following example illustrates the syntax for the removeAll list method (using the $recipients list variable created in the add example):

$transfers = "Building 16"

$transfers::add("Winston Smythe")

$result = $recipients::removeAll($transfers)

print($result)

print($recipients)

Output:

true

['Engineering Group']['Building 14']

['Engineering Group’][’Building 14’]