Snippet: public event with EventHandler<T>

property value
IDE VS Code
Language C#
Title public event with EventHandler<T>
Shortcut et_EventHandlerOfT
Description public event declaration with EventHandler<T>

Placeholders

Identifier Tooltip Default Value
eventArgs EventArgs type name EventArgs
name Event name EventName

Code

public event EventHandler<EventArgs> EventName;

protected virtual void OnEventName(EventArgs e) {
	EventHandler<EventArgs> handler = EventName;
	if (handler != null) {
		handler(this, e);
	}
}