Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why is this happening??
Message
From
30/01/2009 09:41:12
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
30/01/2009 09:34:36
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01378204
Message ID:
01378459
Views:
20
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform