Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remove eventhandler
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Remove eventhandler
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01145973
Message ID:
01145973
Vues:
88
How do I remove the event? Considder this:
this.button1.Click += new System.EventHandler(this.button1_Click);
Now I want to prevent the method button1_Click to fire and I thought I could use System.EventHandler.Remove(...) or System.EventHandler.RemoveAll(...), but I can't find any examples on how to use them. I can't figure out what the arguments are.

I could also add code to the button1_Click method to prevent the code from running but I think removing the event would be cleaner.

Any thoughts.

Thanks,
Einar
Semper ubi sub ubi.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform