Possible to get Class of Interface at runtime
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Jan 22 15:44:34 PST 2016
On Friday, 22 January 2016 at 23:38:58 UTC, Josh Phillips wrote:
> Is there any way that I can find out what class obj is inside
> of printClass?
There's a .classinfo property that works on Objects.
If you have an interface, cast to Object first, and check for
null, then get .classinfo off that.
More information about the Digitalmars-d-learn
mailing list