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

Jaime Anguiano Olarra jaime@geneura.ugr.es
27 Jun 2002 12:07:34 +0200


--=-i8p4j2fGWWveQIhTuj7+
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

Yes!. Sorry, I might be too blind. :-/

Thanks,

Jaime.

El jue, 27-06-2002 a las 12:08, Dwivedi , Ajay Kumar escribi=F3:
> > if (modem is ISpherical)
> > {
> > 	ISpherical isModem =3D (ISpherical) modem;
> > 	modem.Roll();
> > }
> >=20
> > The problem is that modem does not support the ISpherical=20
> > interface but
> > when I compile the program and run it, there is no exception thrown
> > telling me it was an invalid cast.
>=20
> 	Are you expecing a cast Exception??? the code within the if block=20
> is not run since modem is not a ISpherical.
>=20
> 	Try adding an else statement, and see if it gets executed.
>=20
> HTH,
> Ajay
> =20
>=20
--=20
// http://geneura.ugr.es -- The Geneura Team
// http://www.go-mono.com -- The Mono Project

--=-i8p4j2fGWWveQIhTuj7+
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

iD8DBQA9GuPm0ZuGtECkr6cRAi/bAJ9PJhcPdDSMkVfbaFK3WKLwj7UK4QCfY/s+
xYj8+rbeZ1Cw75C7Bfb6iyw=
=xMQ2
-----END PGP SIGNATURE-----

--=-i8p4j2fGWWveQIhTuj7+--