Operators

as

Supported By

Syntax

expression as type

Description

The as operator converts the given value to the given data type. If the given value cannot be converted to the given data type, a script error is triggered.

Note

To avoid triggering a script error, use the is a operator before trying to convert values.

Synonyms

as a, as an

See Also

is a, is not a