addAll

(List Object Variable Method)

Adds all of the list elements from another variable to the variable as list elements. Returns true if the list was successfully modified.

Syntax:

$[ScriptVariable]::addAll(List c)

Parameters:

c (List): the collection of elements to add to the list variable.

Example:

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

$allRecipients = "Management Group"

$allRecipients::addAll($recipients)

print($allRecipients)

Output:

['Management Group']['Engineering Group']['Building 14']['Winston Smythe']