El sáb, 07-02-2004 a las 17:21, Miguel de Icaza escribió: > Hey, > > > Only one little question: What are the main differences between using > > "event" keyword or not when creating delegates? > > > > Example: > > > > delegate void ProbeDelegate (string msg); > > > > ProbeDelegate d1; > > event ProbeDelegate d2; > > events can notify more than one function, a delegate only points to a > single method. > > So you can have multiple "listeners".
But, only using delegates you can do: DelegadoOperacion multiD; multiD = new DelegadoOperacion(s.suma); multiD += new DelegadoOperacion(s.resta); And then call multiD which will call more than one method. So what is the real difference with events ?? Sergio. -- [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
signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente