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

值得尋找的房產。

傳回

truename 是 的 thisob 屬性,且已被設定;否則, false

屬性

適用於