[Mono-list] Problem with the 'is' operator, a bug in the mono runtime??

Jaime Anguiano Olarra jaime@geneura.ugr.es
27 Jun 2002 11:40:33 +0200


--=-jEx5GkfkO/wQg3HRRzqA
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi all,

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

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 =3D (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.
--=20
// http://geneura.ugr.es -- The Geneura Team
// http://www.go-mono.com -- The Mono Project

--=-jEx5GkfkO/wQg3HRRzqA
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Esta parte del mensaje esta firmada digitalmente

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA9Gg2W0ZuGtECkr6cRAm6BAJwMx4z5J0/8dzvWs+bMlAlITTBTiQCgiU1B
8gYPNeGbAFefL9qqS5ZzrtY=
=XFvN
-----END PGP SIGNATURE-----

--=-jEx5GkfkO/wQg3HRRzqA--