与
Cont := TRttiContext.Create; for Prop in Cont.GetType(TStrings).GetDeclaredProperties do Memo1.Lines.Add(Prop.ToString); Cont.Free;
我得到了tstring的所有属性的列表,除了索引属性(字符串,值,…)。 正如我在Get[Declared]中看到的,属性从来都不是索引属性。我怎样才能得到索引属性呢?
你不能。它们不包括在Delphi2010的RTTI中。