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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:01:52+00:00 2026-05-15T17:01:52+00:00

I have learned delegate in dotnet that is referencing any function. What does it

  • 0

I have learned delegate in dotnet that is referencing any function.

What does it mean by event coceptually? Is it any reference ? It has a middle layer and use delegates internally. But, what is that middle layer ?

Actually, what can we do using event ? or Why should we use it ?

Why does event has no return type ? Why is it public by default ?

  • 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-15T17:01:53+00:00Added an answer on May 15, 2026 at 5:01 pm

    I think of an event as a collection of delegated methods. You can subscribe as many event handlers to an event as you want.

    You create an event when you want to expose a point in your code that someone can “inject” operations. For example, let’s say you have a class that is responsible for processing an order. You may want to expose an event called “OrderProcessed” and in the future someone who is using your order processing class could “hook up” to the OrderProcessed event to do something like send a confirmation email. Because the event is a delegate type, you can specify that all methods subscribing to the event expect to receive a parameter that contains your “Order” type

    Example:

    public class OrderEventArgs : EventArgs
    {
         public MyOrderClass Order { get; set; }
         public Boolean Processed { get; set; }
    
         public OrderEventArgs(MyOrderClass order, Boolean processed)
         {
             Order = order;
             Processed = processed;
         }
    }
    public class OrderProcessor
    {
         public delegate void OrderEventHandler(Object sender, OrderEventArgs e);
    
         public event OrderEventHandler OrderProcessed;
    
         public void ProcessOrder(MyOrderClass order)
         {
              //process the order...
    
              if(OrderProcessed != null)
                   OrderProcessed(this,new OrderEventArgs(order,true));
         }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have learned that SO has put questions and answers in the same table.
From the Apple WWDC we have learned that iOS Safari 5 has tabs, and
i have learned that a program is measured by it's complexity - i mean
I have learned from various tutorial that If a client can reasonably be expected
I have learned that Windows uses UTF-16LE on x86/x64 systems. What about Linux? Which
I have an application that stores images in a database. Now I have learned
I have learned that Python 3 is not backwards compatible. Will it not affect
I have learned that browsers can only load a few files from the same
I have learned that when using android:entries with a ListView , it uses android.R.layout.simple_list_item_1
I have learned that type fields is an error-prone technique somewhere I have Google

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.