Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why is this happening??
Message
De
30/01/2009 09:41:12
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
30/01/2009 09:34:36
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01378204
Message ID:
01378459
Vues:
10
Hi John,

>Hi Tim,
>
>That event structure you posted is the old method of doing it. .Net 3.5 introduced generic event handlers allowing you to do this (with all of the plumbing wired for you automatically):
>
>
>        public event EventHandler<NavBarGroupChangedEventArgs> NavBarGroupChanged;
>
>        /// <summary>
>        /// Triggers the NavBarGroupChanged event.
>        /// </summary>
>        public void RaiseNavBarGroupChanged(string group, string lastGroup, NavBarControl control)
>        {
>            var handler = this.NavBarGroupChanged;
>            if (handler != null)
>            {
>                handler(this, new NavBarGroupChangedEventArgs(group, lastGroup, control));
>            }
>        }
>
That is cool, is the delegate the only thing not needed then?
Tim
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform