I have the following class, from which I would like to get some names from the members, such as names
TInterface = interface(IXMLNode)
function Get_One: Boolean;
function Get_Two: Boolean;
function Get_Three: Boolean;
procedure Set_One(Value: Boolean);
procedure Set_Two(Value: Boolean);
procedure Set_Three(Value: Boolean);
property One: Boolean read Get_One write Set_One;
property Two: Boolean read Get_Two write Set_Two;
property Three: Boolean read Get_Three write Set_Three;
end;
TTesting = class(TXMLNode, TInterface)
protected
function Get_One: Boolean;
function Get_Two: Boolean;
function Get_Three: Boolean;
procedure Set_One(Value: Boolean);
procedure Set_Two(Value: Boolean);
procedure Set_Three(Value: Boolean);
end;
to get the name I use the following method that uses TRttiContext
procedure getName();
var
Ctx: TRttiContext;
PropList: TArray<TRttiProperty>;
begin
PropList := Ctx.GetType(TTesting).GetProperties;
for i:= 0 to Length(PropList) do S1:= PropList[i].name; PropList[i].ToString;
.......
when run it, I always have 1 item called RefCount.
Should not I get the values 'One' 'Two' 'Three' ?