Share via


ObjectPrototype.hasOwnProperty(Object, Object) Metode

Definisi

Menentukan apakah objek yang ditentukan berisi properti yang ditentukan.

API ini mendukung infrastruktur produk dan tidak dimaksudkan untuk digunakan langsung dari kode Anda.

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

Parameter

thisob
Object

Objek yang ditindakkan oleh metode ini.

name
Object

Properti yang akan dicari.

Mengembalikan

true jika name adalah properti dari thisob dan telah ditetapkan; jika tidak, false.

Atribut

Berlaku untuk