ToolboxItem.ValidatePropertyType(String, Object, Type, Boolean) 메서드

정의

개체가 지정된 형식인지 확인합니다.

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)

매개 변수

propertyName
String

유효성을 검사할 속성의 이름입니다.

value
Object

유효성을 검사할 선택적 값입니다.

expectedType
Type

속성의 예상 형식입니다.

allowNull
Boolean

허용 하려면 그렇지 않으면 .입니다.

예외

valuenull이고, allowNullfalse인 경우.

value 가 .에 지정된 형식이 expectedType아닌 경우

설명

메서드는 ValidatePropertyType 메서드에 대한 도우미 메서드로 호출됩니다 ValidatePropertyValue .

적용 대상