Hi all,

I would like to know if this is a bug in the runtime. 

I have a little class Modem that does not implement a determined
interface (f.ex. ISpherical). Then I do a test before casting to the
interface (let's forget about using 'as', it's an example to show the
use of 'is'):

if (modem is ISpherical)
{
        ISpherical isModem = (ISpherical) modem;
        modem.Roll();
}

The problem is that modem does not support the ISpherical interface but
when I compile the program and run it, there is no exception thrown
telling me it was an invalid cast.

What's up?.

Thanks in advance,

Jaime.
-- 
// http://geneura.ugr.es -- The Geneura Team
// http://www.go-mono.com -- The Mono Project

Attachment: signature.asc
Description: Esta parte del mensaje esta firmada digitalmente

Reply via email to