Create Event Trigger
- 2 min to read
This Code Provider creates a method called event trigger, which is used to raise the event. The event trigger creates the event instance, ensures it is not null and raises the event using the parameters passed to the event trigger (sender and event arguments).
Available when the caret is on the event name in its declaration.
Place the caret on the event name in its declaration.
The blinking cursor shows the caret's position at which the Code Provider is available.
- Use the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions Menu.
- Select Create Event Trigger from the menu.
After execution, the Code Provider creates a new method in your class. Use this method to raise the event.