size

Returns the number of elements in the list variable.

Syntax:

$[ScriptVariable]::size()

Parameters:

None

Example:

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

$total = $recipients::size()

print($total)

Output:

3