← C# Programming learning pathC# Programming · Module 9 of 10
Delegates, events and lambdas
Pass behaviour around and react to events.
📖 Key ideas
- A delegate is a type-safe function reference.
- Func<T, TResult> and Action<T> are built-in delegates.
- Lambdas: x => x * 2.
- Events let objects notify subscribers: button.Click += Handler.
- Used in UI apps, LINQ and callbacks.
💡 Real-life example: An event is a doorbell; subscribers are people who come running when it rings.
DelegateReference to a method
FuncDelegate returning a value
ActionDelegate returning void
EventNotification mechanism