How to access record properties?
问题 I need to access, record properties, and set/get this property values. Firstly, i want to access properties. But i can't. What is wrong? Ver : Delphi XE6. sample code: type TmyRecord = record private Str : String; public property StrProp :String read Str; end; procedure TForm1.Button3Click(Sender: TObject); var c : TRttiContext; t : TRttiType; field : TRttiField; prop : TRttiProperty; begin c := TRttiContext.Create; try Memo1.Lines.Append('Fields'); for field in c.GetType(TypeInfo(TMyRecord))