Implement delegates and events

Learn how to implement late binding using delegates, how to notify other classes or objects when something of interest occurs using events, and how to manage event publishers and subscribers in a C# application.

Prerequisites

  • An installation of Visual Studio Code with the C# Dev Kit extension installed.
  • The ability to develop object-oriented programs in C# that implement classes, interfaces, class inheritance, and polymorphic behavior.
  • The ability to manage collections, structs, records, generics, dates and times, and anonymous types.
  • A basic understanding of file IO, JSON serialization, and asynchronous programming.

Modules in this learning path

Learn how to declare, instantiate, and invoke delegates for scenarios that require dynamic method invocation, such as callback methods and custom sorting or filtering.

Learn the fundamentals of events in C#, including their reliance on delegates and their role in enabling communication between objects.