Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Delegate Usage Guidelines

Delegate Usage Guidelines

.NET Framework 1.1

A delegate is a powerful tool that allows the managed code object model designer to encapsulate method calls. Delegates are useful for event notifications and callback functions.

Event notifications

Use the appropriate event design pattern for events even if the event is not user interface-related. For more information on using events, see the Event Usage Guidelines.

Callback functions

Callback functions are passed to a method so that user code can be called multiple times during execution to provide customization. Passing a Compare callback function to a sort routine is a classic example of using a callback function. These methods should use the callback function conventions described in Callback Function Usage.

Name end callback functions with the suffix Callback.

See Also

Design Guidelines for Class Library Developers | Callback Function Usage

Show:
© 2015 Microsoft