Share via


JSObject.GetPropertyAsDouble(String) 方法

定义

返回属性的值,就像属性存在一样 Double ,否则返回 0。

public:
 double GetPropertyAsDouble(System::String ^ propertyName);
public double GetPropertyAsDouble (string propertyName);
member this.GetPropertyAsDouble : string -> double
Public Function GetPropertyAsDouble (propertyName As String) As Double

参数

propertyName
String

属性的名称。

返回

具有指定名称的属性的值。

例外

属性值不是数字。

注解

当属性值不是数字时,此方法将 JSException 引发 。

适用于