JSObject.GetPropertyAsBoolean(String) 方法

定義

傳回指定屬性的值,就像屬性存在一樣 Boolean ,否則 false傳回 。

public:
 bool GetPropertyAsBoolean(System::String ^ propertyName);
public bool GetPropertyAsBoolean (string propertyName);
member this.GetPropertyAsBoolean : string -> bool
Public Function GetPropertyAsBoolean (propertyName As String) As Boolean

參數

propertyName
String

屬性的名稱。

傳回

具有指定名稱的屬性值。

例外狀況

屬性值不是 Boolean

備註

當屬性值不是布爾值時,這個方法會 JSException 擲回 。

適用於