HI,the "is" operator works with both interfaces and (base)classes.
I don't find the method ro detect if a class implement an interface.
I try
if (MyObject implements MyInterface)
but it doesn't work.
if (MyObject is MyInterface)
work. Is it the only method to do that ?
J-L
Basically it's "can I treat 'MyObject' as a 'MyInterface'".
A different way would be the "as" operator, which tries a cast but
gives a 'null' if it didn't work:
MyInterface mi = MyObject as MyInterface;
if (mi != null) ...
And if you really want to, you could also use reflection.
Hans Kesting