Search code examples
c#.netdelegatesabstraction

How do delegates provide abstraction


How can we use delegates for abstraction? We can also use interfaces for abstraction so which is better? Is it with using interfaces or using delegates.

A simple practical example will help.

Thankyou.


Solution

  • 1)Prevent extra function creation enter image description here

    2)Events to prevent hard code enter image description here