Event handling is actually a delegate with a special signature, like this: public delegate void EventHandler (object sender, EventArgs e); Type defines an event member, you can notify other objects that something specific has happened. If you define an event member, it means that the type has to provide the ability: #1, the method can be enlisted or it can unregister its attention to the event, which occurs when the registered method receives a notification. The type is able to provide event notification functionality because the type maintains a list of registered methods. After an event occurs, the type notifies all registered methods in the list. The CLR event model is built on the basis of a delegate. A delegate is a type-safe way to call (Invoke) a callback method. The object receives a notification of their subscription with a callback method. ---------
invoke and call in the context of English, the difference between invoke and call is that when executing a method that all information is known, call is more appropriate. This information includes the type to be referenced, the signature of the method, and the method name. However, when you need to "call out" something to help you invoke an information-unaware method, invoke is more appropriate. The problem with---------this onboiled method is that the thread may find that boiled is not null, and then, just before the call, another thread removes a delegate from the delegate chain, making boiled null. A NullReferenceException exception is also thrown. To fix this race problem, you can write the Onboiled method as follows
CLR via C # Deep solution note five-Events