contains

Returns true if the list contains the specified element.

Syntax:

$[ScriptVariable]::contains(Object c)

Parameters:

c (Object): the element to search for in the list.

Example:

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

$confirm = $recipients::contains("Winston Smythe")

print($confirm)

Output:

true