How to get the implementer of an interface?

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Thu Jan 22 06:45:37 PST 2009


Denis Koroskin wrote:
> On Thu, 22 Jan 2009 11:17:20 +0300, Qian Xu 
> <quian.xu at stud.tu-ilmenau.de> wrote:
> 
>> how to get the implementer of an interface?
[snip]
> 
> Try the following:
> 
> writefln(cast(Object)i);

Or
     writefln((cast(Object)i).classinfo.name);
if you want the class name, not the result of toString (which is only 
the class name if it hasn't been overridden).


More information about the Digitalmars-d-learn mailing list