In event communication, the event sender class does not know which object or method will receive (handle) the events it raises. What is needed is an intermediary (or pointer-like mechanism) between the source and the receiver. The .NET Framework defines a special type (Delegate) that provides the functionality of a function pointer.

-------the relationship between Delegate & Event <MSDN>

 


    }
}

 

输出:

 

!

相关文章: