Use Delegates to handle events smartly.
We often come across the need to encapsulate a method inside an object. We do it sometimes because we need to pass it inside another method or class instantiation. A delegate can invoke any method that aligns with its signature and the return type.
![](https://souravbarua.me/wp-content/uploads/2023/01/delegate11-1024x526.png)
Delegates accommodate the feature to execute methods at runtime even when you do not know what those methods are at compile time.