Hoppa till huvudinnehåll

Type.Is

Anger om ett värde av den första typen alltid är kompatibelt med den andra typen.

Syntax

Type.Is(
type1 as type,
type2 as type
) as logical

Remarks

Anger om ett värde för type1 alltid är kompatibelt med type2.

Examples

Example #1

Kontrollera om ett värde av typen nummer alltid kan behandlas som typen any.

Type.Is(type number, type any)

Result:

true

Example #2

Kontrollera om ett värde av typen any alltid kan behandlas som typen nummer.

Type.Is(type any, type number)

Result:

false

Category

Type