[Previous] [Contents] [Next]

Summary


Delegates in C# are type-safe, secure managed objects that serve the same purpose as function pointers in C++. Delegates are different from classes and interfaces in that rather than being defined at compile time, they refer to single methods and are defined at run time. Delegates are commonly used to perform asynchronous processing and to inject custom code into a class's code path. Delegates can be used for a number of general purposes, including using them as callback methods, defining static methods, and using them to define events.

[Previous] [Contents] [Next]