When you want to customize the behavior of an object you can use delegate, A delegate is a reference to a method. Whereas objects can easily be sent as parameters into methods, constructor or whatever, methods are a bit more tricky.
- Delegates are similar to C++ function pointers, but are type safe.
- Delegates allow methods to be passed as parameters.
- Delegates can be used to define callback methods.
- Delegates can be chained together; for example, multiple methods can be called on a single event.
Editor, DotNetSpider MVM
Microsoft MVP 2014 [ASP.NET/IIS]