JSObject.GetPropertyAsString(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回属性的值,就像属性存在一样 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 。