Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5972707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:41:47+00:00 2026-05-22T20:41:47+00:00

In a C# Application we can add an Event Handler like this.button3.Click += new

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:41:47+00:00Added an answer on May 22, 2026 at 8:41 pm

    You can easily display a list of all possible events for your component with a code like

    EventInfo[] allEvents = Button1.GetType().GetEvents(System.Reflection.BindingFlags.Instance
        | System.Reflection.BindingFlags.Public);
    foreach (EventInfo curEvent in allEvents)
    {
        EventsListBox.Items.Add(curEvent.Name);
    }
    

    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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application user can add there reminder for the specific day and reminder
I am trying to create an iPhone application where the user can add entries.
How can I add a spellchecker to a richtextbox in my application?
how can i add concept of theme or skin to iPhone application ? my
I have made a custom UserControl i Vb.net (windows application). How can I add
Can anyone tell me how to add an AssemblyInfo.vb file to a Web Application
I have a vb.net application which does some processing. This processing can take a
In a WPF application, I've got my events centralized in one class like this:
I'd like to know whether there is a way to add an error handler
I would like to add a right click context menu/sub menus to my win32

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.