【问题标题】:Delphi 2010 RTTI - how can I get list of indexed properties?Delphi 2010 RTTI - 如何获取索引属性列表?
【发布时间】:2010-08-10 20:00:20
【问题描述】:

  Cont := TRttiContext.Create;
  for Prop in Cont.GetType(TStrings).GetDeclaredProperties do
    Memo1.Lines.Add(Prop.ToString);
  Cont.Free;

我得到了 TStrings 的所有属性列表,除了索引属性(字符串、值、...)。 正如我在 Get[Declared]Properties 中看到的,它永远不是索引属性。我怎样才能获得索引属性?

【问题讨论】:

标签: delphi delphi-2010 rtti


【解决方案1】:

你不能。它们不包含在 Delphi 2010 的 RTTI 中。

【讨论】:

  • 好吧,我能说的不多了。我对为什么有一些想法,但我无法很好地解释它。巴里凯利可能会。不知道他会不会看到这个问题……
猜你喜欢
  • 2011-01-30
  • 2012-07-06
  • 2011-01-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-06-01
相关资源
最近更新 更多