It should give you an idea of some different areas in which delegates may be appropriate:
They enable callback functionality in multi-tier applications as demonstrated in the examples above.
The CacheItemRemoveCallback delegate can be used in ASP.NET to keep cached information up to date. When the cached information is removed for any reason, the associated callback is exercised and could contain a reload of the cached information.
Use delegates to facilitate asynchronous processing for methods that do not offer asynchronous behavior.
Events use delegates so clients can give the application events to call when the event is fired. Exposing custom events within your applications requires the use of delegates.
No comments:
Post a Comment