TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sourcehoh
NA
18
0
Remove Event Handler in C#
Sep 8 2004 4:57 AM
How can I remove event handler for a particular control. I knew that the proper way is like below: button1.Click += new System.EventHandler(button1_Click); // ADD Handler button1.Click -= new System.EventHandler(button1_Click); // Remove Handler But I want some other way which is more flexible, which I don't need to indicate the previous method name in order to remove the event handler( in my example, I need to supply the method name ( button1_click ) to remove. Is that posible to have some other method to remove the handler? As I know in delphi I only need to set the method point to nil ( as below ) button1.onclick := nil; Hope someone can help me in this context , thank you
Reply
Answers (
1
)
DragDrop in TreeView- knowing where the drag came from
opening multiple browser windows