C #-delegate and event,
Delegates a method. If you do not know the method name, you can declare the method first by delegation. When you want to use the method, you can write the method name when the delegation instantiates the method.
Declare first,
Public delegate int delegateClassName (parameter list); specify the call method delegateClassName delegateName = new delegateClassName (method class name. method that has the same parameter list and return value as delegateClassName). The method is automatically executed during instantiation. You can assign multiple methods. In this case, no return value is returned because you do not know which method to return. Delegates can be added, that is, one delegate calls multiple methods, but the delegate declaration and method declaration do not return values. The Special Delegate public event Delegate name OnEventname is actually the addition of the Delegate. The event is added to the delegate, so that when an event occurs, the method specified by the delegate is called.