Running the program
Alright, crank this program up in your browser now. Click on the Update Labels
button. Remember, this requires a little bit of patience because of how we specified the time intervals, or sleeping times, to exaggerate the effects of time a bit. Figure 6.20.7 shows that the labels have finished updating and when:

Figure 6.20.7: The results of running the program show that the labels have finished updating and when
Clearly, because of the sleeping times we entered, you can see that this run was updated first at 5:11:47 PM
, then at 5:11:47 PM
, and finally at 5:11:57 PM
, all on 10/16/2015
, of course.
These are the basics. Remember the idea here, so you don't forget that the main point is that you have a delegate
function, such as public delegate void LabelUpdater
, and you can make an object of that type, as you can see the type in LabelUpdater lu
. You can assign different functions to it, and you can stack the function calls together and then lu.Invoke
will call the functions...