Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Event Error
Message
From
11/05/2009 07:17:21
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Miscellaneous
Thread ID:
01398902
Message ID:
01399032
Views:
45
I might even take that one step further for thread safety and copy it to a local reference first.

protected virtual void OnSortOrderChanged(SortOrderEventArgs e)
{
SortOrderEventHandler so = this.SortOrderChanged;
if (so != null)
{
// Raise the Event
this.SortOrderChanged(this, e);
}
}

Tim

>Thank You!
>
>>ALWAYS check whether anything is actually wired up to consume the event:
>>   protected virtual void OnSortOrderChanged(SortOrderEventArgs e)
>>    {
>>       if (SortOrderChanged != null)
>>        SortOrderChanged(this, e);
>>    }
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform