Observer Pattern in C# = Events & delegates(spellcoder.com)

submitted by bashmohandesbashmohandes(3000) 4 years, 11 months ago

One of the most interesting patterns in Design Patterns is the Observer pattern which is listed under Behavioral Patterns, it is really important how to make other classes which are interested in the state of another object get notified when the state changed.

3 comments |category: |Views: 1502

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by yesthatmcgurkyesthatmcgurk(4063) 4 years, 11 months ago 0

Article isn't very interesting; its just a very short primer on events and event handlers.

Reply

posted by rimsystemsrimsystems(6119) 4 years, 11 months ago 0

It may not be interesting to you, but for some people out there that struggle to understand events and delegates, I can see this being very helpful. I struggled with this concept for a long time and couldn't find any concise demonstrations to help me out. This article would have been very helpful.

Reply

posted by bashmohandesbashmohandes(3000) 4 years, 11 months ago 0

When I wrote the article I was trying to make it easy for the people coming from the Java background why the Events & Delegate concept is more suitable than the observer model.

Reply

information Login or create an account to comment on this story