Callback Interfaces, Delegates, and Events
Up to this point in the text, every sample application you have developed added various bits of code to Main(), which (in some way or another) sent messages to a given object. However, you have not yet examined how an object can talk back to the entity that created it. In most programs, it is quite common for objects in a system to engage in a “two-way conversation” through the use of events, callback interfaces, and other programming constructs. To prime the pump, I begin this chapter by examining how custom interfaces may be used to enable callback functionality (which may ring a bell if you are a COM developer).
KeywordsFunction Pointer Hash Code Object User Event Sink Static Void
Unable to display preview. Download preview PDF.