Delphi How to get default value for property using RTTI
If I have a class like this: TServerSettings = class(TSettings) strict private FHTTPPort : Integer; published property HTTPPort : Integer read FHTTPPort write FHTTPPort default 80; end; How can I get the default attribute of the HTTPPort property using RTTI? Like this: {$APPTYPE CONSOLE} uses System.TypInfo; type TMyClass = class strict private FMyValue: Integer; published property MyValue: Integer read FMyValue default 42; end; var obj: TMyClass; PropInfo: PPropInfo; begin obj := TMyClass.Create; PropInfo := GetPropInfo(obj, 'MyValue'); Writeln(PropInfo.Default); end. Note that the class as