Delphi 如何获取trttiparmeter';s的默认值

Delphi 如何获取trttiparmeter';s的默认值,delphi,delphi-2010,delphi-xe,rtti,Delphi,Delphi 2010,Delphi Xe,Rtti,我有这门课: TMyClass = class public function DoSomethingNice(const Value: string = 'Yes please!'): Boolean; end; 现在,使用RTTI,是否可以获得方法DoSomethingNice的参数值的默认值?如果是,怎么做 我最感兴趣的是D2010解决方案,但XE也可以。这是不可能的,因为RTTI没有关于默认参数的信息。 默认参数值仅在编译时使用 所以,如果我们有。。。 程序测试(x:integer

我有这门课:

TMyClass = class
public
  function DoSomethingNice(const Value: string = 'Yes please!'): Boolean;
end;
现在,使用RTTI,是否可以获得方法DoSomethingNice的参数的默认值?如果是,怎么做


我最感兴趣的是D2010解决方案,但XE也可以。这是不可能的,因为RTTI没有关于默认参数的信息。 默认参数值仅在编译时使用

所以,如果我们有。。。
程序测试(x:integer=3)
然后调用不带参数值的方法:
test()
然后将其编译为
test(3)

要检查这一点,可以在调试器中打开CPU窗口: 而
test()
看起来

 mov  eax, $00000003
 call test

目前还不可能,但你可以在这个@RRUZ中投票谢谢,我对此不确定,但我期待着。。。