instanceof?

Jacob Carlborg doob at me.com
Wed Aug 1 23:24:36 PDT 2012


On 2012-08-02 05:06, Jonathan M Davis wrote:

> if(cast(Class)obj)
>
> is the canonical way to do it.

Or, to use the value after the cast:

if (auto foo = cast(Class) obj)
     // use foo

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list