English
Topic 14. Delegates, lambda expressions, and events
Goal: become familiar with delegates, lambda expressions, and events in C#; learn to pass behavior into methods with Action, Func, and Predicate<T>, create higher-order functions and closures, declare and raise events according to the standard .NET pattern, and subscribe to and unsubscribe from them.
Lecture contents
- Delegates — A method as a value · Delegates · Built-in delegates
- Lambda expressions and closures — Lambda expressions · Closures · Higher-order functions
- Events — Events
- Examples and common mistakes — Example programs · Common mistakes