Events
The event keyword is used to declare an event in a publisher class. The following code segment displays how to declare and raise an event.
Events can only be invoked from within a class, so they can be extremely useful when implementing a customizable API or library. One can assign a function to be called whenever the publisher class raises the event by doing the following:
Last updated