Navigate from ClassInfo to TypeInfo

davidl davidl at nospam.org
Tue Apr 14 19:05:27 PDT 2009


在 Wed, 15 Apr 2009 02:16:44 +0800,Frank Benoit  
<keinfarbton at googlemail.com> 写道:

> I need to retrieve an instance of TypeInfo from an object instance at
> runtime.
>
> TypeInfo info = typeid(obj) // does not work, only compile time
>
> TypeInfo info = obj.classinfo.????; // how to navigate to TypeInfo?
>
> Is that possible?
> If not, why? And can it be added (D1)?

Send this object to vararg func, and retrieve the TypeInfo there and  
return?

-- 
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/



More information about the Digitalmars-d mailing list