Why are delegates used?

All delegates are classes that are implicitly derived from System.Delegate. In general, delegates are useful for two main reasons:
  • Delegates support events.
  • Delegates give your program a way to execute methods at runtime without having to know precisely what those methods are at compile time. This ability is quite useful when you want to create a framework that allows components to be plugged in.
Related Post: Delegates, Multicast Delegates (Multicast Delegates)Anonymous Methods

No comments:

Post a Comment