System.TypInfo.PropType
Delphi
function PropType(Instance: TObject; const PropName: string): TTypeKind;
function PropType(AClass: TClass; const PropName: string): TTypeKind;
C++
extern DELPHI_PACKAGE TTypeKind __fastcall PropType(System::TObject* Instance, const System::UnicodeString PropName)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.TypInfo.pas System.TypInfo.hpp |
System.TypInfo | System.TypInfo |
Description
Retrieves a component's property type.
PropType utilises Delphi's RTTI (Run Time Type Information) to return the type of a component property in a TTypeKind value.
In the first form of this function, AClass specifies the component class whose property you want to retrieve. PropName specifies the property name as a string.
The second form of the function is similar to the first, with Instance replacing AClass as the means of specifying the component.
In both forms of the function, the returned value is a TTypeKind value.
Note: If the specified property does not exist, or is not a published property, an EPropertyError exception is thrown.