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

  • Home
  • SEARCH
  • 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 348173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:20:24+00:00 2026-05-12T11:20:24+00:00

In some ASP.NET examples i see that events are used with delegates like this

  • 0

In some ASP.NET examples i see that events are used with delegates like this and sometimes without them like this.

Please explain!

  • 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-12T11:20:24+00:00Added an answer on May 12, 2026 at 11:20 am

    All events are delegate types (they all inherit from EventHandler that inherits from MulticastDelegate which interits from Delegate). Sometimes (or I would rather say most of the time) there is no need to declare your own custom delegate for an event though. You can use existing delegates as long as they match the signature of your event. With the introduction of EventHandler<T> in .NET Framework 2.0, the need for custom event delegates pretty much disappeared (as long as you follow the event design of the framework). So, doing the following:

    // declare an event with a custom delegate type
    public delegate void MyCustomEventHandler(object sender, EventArgs e);
    public event MyCustomEventHandler SomeCustomEvent;
    

    …is equivalent of this:

    // declare an event with an existing delegate type
    public event EventHandler SomeCustomEvent;
    

    Should you have some custom EventArgs class, you can instead use the generic EventHandler<T> for your events:

    class MyCustomEventArgs : EventArgs
    {
        // you custom stuff here
    }
    
    public event EventHandler<MyCustomEventArgs> SomeCustomEvent;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to integrate some existing Perl code with ASP.NET. I see plenty examples
I have some ASP.NET page and webservice WebMethod() methods that I'd like to add
I've heard something and seen some examples of web application built using ASP.NET /
I need some asp.net pagination code samples. I would like suggestions on open source
Are there any open-source examples of ASP.NET MVC applications that use the Entity Framework?
In the current examples on ASP.NET MVC I see quite basic entities, with simple
I was writing some ASP.NET control when I came to the scenario where I
I have some ASP.NET web services which all share a common helper class they
I have some ASP.NET Master Pages located in one assembly. I need to use
I'm adding some ASP.NET MVC pages to an existing ASP.NET Web Forms project. I've

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.