ObjectPrototype.hasOwnProperty(Object, Object) Methode

Definition

Bestimmt, ob das angegebene Objekt die angegebene Eigenschaft enthält.

Diese API unterstützt die Produktinfrastruktur und ist nicht für die direkte Verwendung aus Ihrem Code gedacht.

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

Das Objekt, auf das diese Methode ausgeführt wird.

name
Object

Die eigenschaft, nach der gesucht werden soll.

Gibt zurück

true if name is a property of thisob and has been set; otherwise, false.

Attribute

Gilt für: