Delegates

A delegate is a class and, therefore, a reference type. It is derived from the base class System.Delegate. Just like any other class, a delegate must be defined and can then be instantiated.

Note

In OOP terminology, we distinguish between the term class as being the definition of a class you can read in the source code, whereas its instantiation that takes place during runtime is called an object. Unfortunately, delegates don't have a similar terminology. Both the delegate definition and the delegate's instantiations are referred to as delegates.

Even though delegates are derived from System.Delegate, we don't use the familiar class-derivation ...

Get C# Primer Plus now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.