JSObject.GetPropertyAsInt32(String) 方法

定義

傳回屬性的值,就像屬性存在一樣 Int32 ,否則傳回 0。

public:
 int GetPropertyAsInt32(System::String ^ propertyName);
public int GetPropertyAsInt32 (string propertyName);
member this.GetPropertyAsInt32 : string -> int
Public Function GetPropertyAsInt32 (propertyName As String) As Integer

參數

propertyName
String

屬性的名稱。

傳回

具有指定名稱的屬性值。

例外狀況

屬性值不是整數。

備註

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

適用於