Back to course

Delegates and Events

.NET Zero to Hero: Master C# and Modern App Development

Delegates and Events

Delegate:

A type that represents references to methods with a particular parameter list and return type. It's essentially a "function pointer".

Event:

A way for a class to notify other classes when something happens (e.g., a button click).

csharp public delegate void Notify(); // delegate

public class Process { public event Notify ProcessCompleted; // event }