uses Rtti;procedure TForm1.btn1Click(Sender: TObject);var ctx: TRttiContext;begin ShowMessage(ctx .GetType(TButton) .GetProperty('Caption') .GetValue(Sender) .ToString); // 同 btn1.Caption, 输出: btn1end;