Firing events with Extension Methods (elegantcode.com)

published 2 years, 2 months ago, submitted by cwbrandsmacwbrandsma(1705) 2 years, 2 months ago

A different way of firing standard .Net events using Extension Methods

1 comment | category: | Views: 13

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 paul_houlepaul_houle(435) 1 year, 7 months ago

:D Great use of an extension method -- his specific example isn't thread safe, but the encapsulation that he promotes makes it ~easy~ to write threadsafe code.

information Login or create an account to comment on this story