Delegates, can’t live with them, can’t live without them.

Introduction There is a famous quote by Jim Henson: “If you can’t beat them. Join them”. It’s possible to write code for years without deliberately using delegates. I say “deliberately” because we may have used them without realizing it. Knowing what these types represent makes reading code easier. Knowing how to use them adds some useful … Read more

Moving Forward with .NET Events, Event-Handlers and CustomEventArgs

Introduction In the previous post on Events, we talked about how we are surrounded by events and how useful they can be when writing loosely coupled code. We saw how we can define events, raise and finally handle events. If you haven’t already then I will suggest to read that post for the background and … Read more

Introduction to .NET Events and Event- Handlers

Introduction Our physical world is surrounded by events e.g. Door Opened, Engine Started, Plane landed etc and we see events in the virtual world as well e.g. email received, friend-request sent, post liked etc. This is a very common concept, many programming languages support this and in this post we will see that how we … Read more