O'Reilly logo

Special Edition Using C# by NIIT

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Delegates

Delegates are reference types that encapsulate methods. Delegates are used as container objects that encapsulate or hide the referenced methods. This is done so that the client code that uses a delegate is restricted from accessing any important information that might be contained in the method.

→ To learn more about objects, seeObjects,” p. 89

There are two kinds of methods, static and instance. A static method is a method that is associated with a class. An instance method is a method that is associated with an instance of a class. Delegates support both static and instance methods. This is because delegates are not affected by the type of objects they encapsulate. Delegates only check to ensure that the signature of the method ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required