JSObject.GetPropertyAsString(String) 方法

定义

返回属性的值,就像属性存在一样 String ,否则返回 null

public:
 System::String ^ GetPropertyAsString(System::String ^ propertyName);
public string? GetPropertyAsString (string propertyName);
member this.GetPropertyAsString : string -> string
Public Function GetPropertyAsString (propertyName As String) As String

参数

propertyName
String

属性的名称。

返回

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

例外

属性值不是字符串。

注解

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

适用于