In this short article I will show how to implement event handler using a new attribute : event
To declare a new event handler we should declare the field with event attribute:
The first parameter indicates the action type (func1 is an action with a single generic parameter), the second one - the property name to be used for attaching the handler.
To attach the handler we have to call the property with our action:
The simple example code is below: