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 3721066
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:25:46+00:00 2026-05-19T05:25:46+00:00

hi all My friend says in c#, every event handler is bound to a

  • 0

hi all
My friend says “in c#, every event handler is bound to a method which its name is On….”
I mean, for example, SelectedIndexChanged of a combobox is bound to a method named OnSelectedIndexChanged.

My question is: How can I see it?

Please tell me more about that if its possible.

Thank you

  • 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-19T05:25:47+00:00Added an answer on May 19, 2026 at 5:25 am

    The methods that start with “On….” are used as a convention. These methods are not “bound” in any way with an event nor an event is “bound” to them (taking into consideration the generally accepted definition/procedure of registering for an event).

    What they actually do is raise the event suggested by the words following the “On” prefix.

    For instance:

    protected void OnSelectedIndexChanged(EventArgs e)
    {
       if(SelectedIndexChanged!= null)
          SelectedIndexChanged(this, e);
    }
    

    where SelectedIndexChanged event is defined somewhere like this:

    public event EventHandler SelectedIndexChanged;
    

    The convention and .net practices state that for each event you should have a overridable protected method that raises the event.

    In a derived class you could do something like that:

    protected override void OnSelectedIndexChanged(EventArgs e)
    {
       base.OnSelectedIndexChanged(e);
    
       // your custom code here
    }
    

    NOTE: To be absolutely correct, this event and others may use different derived types from the EventArgs class but the concept is the same.

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

Sidebar

Related Questions

I'm trying to make my app publish to all my friend's walls. From what
Is there any way to retrieve all friends in a particular network? For example,
A friend of mine is getting this error on ALL of her websites. They
I've went into argument with my friend, who says that for building applications, using
I have a table called Friends are its fields are name, phone, address, skype,
The title basically says it all. I mainly want to do this so that
hey the title pretty much says it all. i have been trying different methods
I have two tables table 1 : id, name, age, gender. table 2(friend) :
I've been reading the documentation which at a point says This dialog will request
A friend gave me a puzzle that he says can be solved in better

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.