How to compare two types?

MarisaLovesUsAll via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Aug 31 15:45:40 PDT 2014


How to compare two types? Will I use T.stringof instead of this?

void main()
{
	if(One is Two) {} //Error: type One is not an expression
                           //Error: type Two is not an expression
}

class One {}
class Two {}

Regards,
MarisaLovesUsAll


More information about the Digitalmars-d-learn mailing list