How to check type of an object to a class name?

Pedro Lacerda pslacerda at gmail.com
Mon Mar 5 16:43:54 PST 2012


This works:

assert(typeid(anonObject) == typeid(test));

Pedro Lacerda



2012/3/5 Chris Pons <cmpons at gmail.com>

> Is it possible to check the type of an object to a class name?
>
> //Something like this:
> Class test
> {
> //...
> }
>
> assert(is(anonObject == typeof(test))
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20120305/dbd999a4/attachment.html>


More information about the Digitalmars-d-learn mailing list