Events, Delegates, and Lambda Expression in C#:
In this chapter, we are going to discuss three important concepts and also the most confusing concepts i.e. Events, Delegates, and Lambda Expressions in C#, and how they work in Application Development. I am really excited to make posts on Events, Delegates, and Lambda Expression concepts and the reason is over the years students and many beginners level developers even experienced developers find it very difficult to understand these concepts. Even in my initial days, I also found it very difficult to understand these concepts. So, the goal of this chapter is to provide a big picture of how events, delegates, and lambda expressions are used in C#. To take full advantage of Events, Delegates, and Lambda Expression concepts, you should and must have prior experience with the C# programming language.
How we are going to cover the concepts?
- First, we will discuss the Role of Events, Delegates, and Event Handlers. You need to understand the role of each one of these and how they work together in the .NET Framework.
- Next, we will talk about How to Create Events, Delegates. And EventArgs in C#. Here, we are going to discuss what is delegate and how to integrate delegates with events, and what is the role of custom event classes.
- Next, we will talk about Handling Events. Here, we will create a class that will expose one or more events and how we can consume those events from other classes and we will try to understand different techniques to consume the events.
- Finally, we will talk about Lambda and Delegates.
In the next article, I am going to discuss the Role of Events, Delegates, and Event Handlers in C# with Examples. Here, in this article, I just give you an overview of how we are planning and going to cover three important but most confusing concepts i.e. Events, Delegates, and Lambda Expression in C#. I hope you are going to enjoy this series of articles.