ToolboxItem.ValidatePropertyType(String, Object, Type, Boolean) Methode

Definition

Überprüft, ob ein Objekt einen bestimmten Typ aufweist.

protected:
 void ValidatePropertyType(System::String ^ propertyName, System::Object ^ value, Type ^ expectedType, bool allowNull);
protected void ValidatePropertyType(string propertyName, object value, Type expectedType, bool allowNull);
protected void ValidatePropertyType(string propertyName, object? value, Type expectedType, bool allowNull);
member this.ValidatePropertyType : string * obj * Type * bool -> unit
Protected Sub ValidatePropertyType (propertyName As String, value As Object, expectedType As Type, allowNull As Boolean)

Parameter

propertyName
String

Der Name der zu überprüfenden Eigenschaft.

value
Object

Optionaler Wert, für den überprüft werden soll.

expectedType
Type

Der erwartete Typ der Eigenschaft.

allowNull
Boolean

true zuzulassen null; andernfalls false.

Ausnahmen

value ist null, und allowNull ist false.

value ist nicht der von expectedType.

Hinweise

Die ValidatePropertyType Methode wird als Hilfsmethode für die ValidatePropertyValue Methode aufgerufen.

Gilt für: