System.TypInfo.PropIsType

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function PropIsType(Instance: TObject; const PropName: string; TypeKind: TTypeKind): Boolean;
function PropIsType(AClass: TClass; const PropName: string; TypeKind: TTypeKind): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall PropIsType(System::TObject* Instance, const System::UnicodeString PropName, System::TTypeKind TypeKind)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.TypInfo.pas
System.TypInfo.hpp
System.TypInfo System.TypInfo

Description

Determines if a component property is of a particular data type.

PropIsType returns true if the property is of the specified data type.

In the first form of this function, AClass specifies the component class whose property you want to look at.

The second form of the function a class Instance replaces AClass.

In both forms of the function, PropName specifies the property name as a string. If the property has the TypeKind data type, then true is returned. Otherwise false is returned.

Note: If the specified property does not exist, or is not a published property, an EPropertyError exception is thrown.

See Also