Guard

Produces a sequence containing either a single void value, or an empty sequence, depending on whether the condition evaluates to true or false. Can be used to filter out elements from a sequence.

Syntax

Sequence.Guard
   ·  [condition]

Parameters

condition
An expression that evaluates to true or false.

Return Value

A sequence containing a single void value if the condition was true, or an empty sequence otherwise.