Delegate and event are two fundamental concepts in C#. Delegate especially is an extremely critical feature of .NET and is used widely in different language features.

Delegate is a type in C#. It represents a reference to a method (like a function pointer). And delegates are mainly used for callbacks.

Event on the other hand is used to attach a callback which will be called due to a trigger. The event keyword is used to declare the event in C#.

In this video, I will first start with defining delegate, then transition to use out of box delegates Action and Func. And the transition to lambda expressions. And finally using events.

At 12:23 I said anonymous type, what I meant is an anonymous function.
At 15:27 I said the name of the delegate, what I meant is the name of the event.

The URL for my GitHub repo is here: https://github.com/choudhurynirjhar

#csharp #programming #dotnet #developer

Delegate and Event in C# (An introduction for new .NET Developers)
1.85 GEEK