[Mono-list] Little question ...
Sergio Blanco Cuaresma
sergio-blanco@iespana.es
Thu, 19 Feb 2004 20:55:53 +0100
--=-Tpim3Dt5ubJgs/SOpoem
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable
El s=E1b, 07-02-2004 a las 17:21, Miguel de Icaza escribi=F3:
> Hey,
>=20
> > Only one little question: What are the main differences between using
> > "event" keyword or not when creating delegates?
> >=20
> > Example:
> >=20
> > delegate void ProbeDelegate (string msg);
> >=20
> > ProbeDelegate d1;
> > event ProbeDelegate d2;
>=20
> events can notify more than one function, a delegate only points to a
> single method.
>=20
> So you can have multiple "listeners".
But, only using delegates you can do:
DelegadoOperacion multiD;
multiD =3D new DelegadoOperacion(s.suma);
multiD +=3D new DelegadoOperacion(s.resta);
And then call multiD which will call more than one method. So what is
the real difference with events ??
Sergio.
--=20
[aka Marble]
Web Personal <> http://www.marblestation.com
Registered LiNUX user #140941 <> http://counter.li.org/
Socio #3274 de HispaLinux <> http://www.hispalinux.es
Miembro de GPL URV <> http://www.gplurv.org
GnuPG key: 0x0ED2CF9D <> hkp://pgp.escomposlinux.org
--=-Tpim3Dt5ubJgs/SOpoem
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
digitalmente
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQBANRTJfGXf5g7Sz50RAoOYAKDwo5WDiJik4E79lUJBsFAQShlPlQCgzXHU
WkV95WOMM1tyO1Jft5NwoG0=
=ocG4
-----END PGP SIGNATURE-----
--=-Tpim3Dt5ubJgs/SOpoem--