C# Delegates

A delegate is an object that know how to call a method. A delegate is similar to a callback, a general term that captures construcs such as C function pointers.…

A delegate is an object that know how to call a method.

A delegate is similar to a callback, a general term that captures construcs such as C function pointers.

A delegate design might be a better choice than an interface design if one or more of these conditions are true:

  • The interfac defines only a single method
  • Multicast capability is needed
  • The subscriber needs to implement the interface multiple times

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *