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 擲回 。

適用於