ObjectPrototype.hasOwnProperty(Object, Object) 方法

定義

判斷指定的物件是否包含指定的屬性。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public:
 static bool hasOwnProperty(System::Object ^ thisob, System::Object ^ name);
[Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.Object_hasOwnProperty)]
public static bool hasOwnProperty (object thisob, object name);
[<Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.Object_hasOwnProperty)>]
static member hasOwnProperty : obj * obj -> bool
Public Shared Function hasOwnProperty (thisob As Object, name As Object) As Boolean

參數

thisob
Object

這個方法執行位置的物件。

name
Object

要搜尋的屬性。

傳回

如果 namethisob 的屬性而且已設定,則為 true,否則為 false

屬性

適用於