Delegates are written specifically for other parties to hook into our code. This is either through an extensibility request, or because we envisage that it will be required. All the events in the tables are actually delegates, and if we write a delegate on a table, they will also appear in the events list.
One thing that delegates can't do is return a value, and we will use an example where information is passed back to the caller from the delegate. This is done by passing a value that is passed by reference—such as a table or a class.
In our example, we will write a delegate to be called when the status changes.