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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:39:43+00:00 2026-05-20T21:39:43+00:00

Since I start using event in c# I always want to know if it’s

  • 0

Since I start using event in c# I always want to know if it’s OOP oriented.

Let me explain. In Java, it had EventListner, Observer/Observable which object have to inherit to be able to fire an event or to listen to it . My point is, in Java, it have to be an object which have the responsibility to notify the subscriber or to do an action after being notify. In c#, all I see is :

public delegate void SomeHandler();
public event SomeHandler OnAction;

...
//somewhere in the firing class
OnAction();

...
//somewhere else in a subscriber class
_generateReport.ReportSubmited += someMethod;

private void someMethod()
{
//do some job
}

No class, only method and attribut…

So, is it OOP and if it is, how does it work?

Thanks !

  • 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-20T21:39:43+00:00Added an answer on May 20, 2026 at 9:39 pm

    The type responsible for holding a list of handlers is the SomeHandler type, which is a delegate type. You can build an instance of a delegate from an appropriate method, representing a call to that method… and you can combine delegates together to represent a sequence of calls.

    Think of events as language/platform support for the observer pattern, basically.

    You should be aware of what events and delegates are like under the hood – see my article on them for some more details.

    The non-OO part of this is that although delegates can be passed around like any other object, events can’t 🙁 You can use their reflection equivalent (EventInfo) but it’s not quite the same thing…

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

Sidebar

Related Questions

I want to start coding in Python or Ruby. Since I own a Lego
I'm using the PopUpManager to bring a bunch of event windows up. I want
Not much code since I'm a bit at a loss on how to start.
If i use thread like this: void foo() { new Thread().Start(); } since the
I have data at a number of days since an event. This data is
Just want to start out by saying this seems like a great site, hope
I'm using Django's generic year archive view to display event objects by year. This
I am using a method to add an event to an internal calendar on
I am using this article of architecture http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/ in my code: I have this
I'm having problem from a while (since I'm using visual studio 2010 I think).

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.