Y
Yahoo
I am trying to determine if an object inherits a given interface at runtime
and cant figure out how to do it.
if we knew the interface type at design time...
if (x is typeof(InterfaceName))
but how do we do it when we dont know the interface until runtime.
What a want to do...
void myfx(Type type)
if (x is typeof(type)) (ILLEGAL)
What also doesnt work...
if (x.getType() == type) (wont compare inherited types)
and cant figure out how to do it.
if we knew the interface type at design time...
if (x is typeof(InterfaceName))
but how do we do it when we dont know the interface until runtime.
What a want to do...
void myfx(Type type)
if (x is typeof(type)) (ILLEGAL)
What also doesnt work...
if (x.getType() == type) (wont compare inherited types)