Value.Is

语法

Value.Is(value as any, type as type) as logical

关于

确定值是否与指定类型兼容。 这相当于 M 中的“is”运算符,不同之处在于它可以接受标识符类型的引用(如 Number.Type)。

示例 1

比较确定数值是否与类型 number 兼容的两种方法。

使用情况

Value.Is(123, Number.Type) = (123 is number)

输出

true

results matching ""

    No results matching ""