In a C# Application we can add an Event Handler like this.button3.Click += new System.EventHandler(this.button3_Click); also we can Remove this.button3.Click -= new System.EventHandler(this.button3_Click); so it means we can add as much as we want event’s in an UI Control ,so my question is how can i Explore or Iterate and Remove a Specific Event from an UI .
Eg . If we can in someway populate all Events of an Control on a ListBox (if it’s possible) and remove the Selected One .
PS : Im kinda a Junior Programmer ,so i think Code Reflection handles this portion.
Bests
You can easily display a list of all possible events for your component with a code like
However, it seems impossible to know which methods are assigned to the delegates, that will be called in case of an event, outside of the component. You can refer to How do I find out if a particular delegate has already been assigned to an event?, Determine list of event handlers bound to event and Iterating through event handlers