Learning C# (Day 11) – Events In C# (A Practical Approach)


Introduction

This article of the “Diving into OOP” series will explain all about events in C#. The article focuses more on practical implementations and less on theory.

Events (The definition)

Let’s start with the definition taken from MSDN.

“Events enable a class or object to notify other classes or objects when something of interest occurs. The class that sends (or raises) the event is called the publisher and the classes that receive (or handle) the event are called subscribers.”

Continue reading “Learning C# (Day 11) – Events In C# (A Practical Approach)”

Learning C# (Day 10): Delegates in C# (A Practical Approach)

This article of the series “Diving into OOP” will explain all about delegates in C#. The article focuses more on practical implementations and less on theory. The article explains the concept in-depth.


Introduction

This article of the series “Diving into OOP” will explain all about delegates in C#. The article focuses more on practical implementations and less on theory. The article explains the concept in-depth.

Delegates (The definition)

Let’s start with the definition taken from MSDN

“A delegate declaration defines a reference type that can be used to encapsulate a method with a specific signature. A delegate instance encapsulates a static or an instance method. Delegates are roughly similar to function pointers in C++; however, delegates are type-safe and secure.”

Continue reading “Learning C# (Day 10): Delegates in C# (A Practical Approach)”

Understanding Events in C# (An Insight)


Introduction

Events are one of the core and important concepts of C# Programming environment and frankly speaking sometimes it’s hard to understand them without proper explanation and example.

So I thought of writing this article to make things easier for learners and beginners.

Continue reading “Understanding Events in C# (An Insight)”