Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Event Error
Message
De
11/05/2009 07:17:21
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Divers
Thread ID:
01398902
Message ID:
01399032
Vues:
46
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform