Snippet: private event

property value
IDE VS Code
Language C#
Title private event
Shortcut pet_EventHandler
Description private event declaration

Placeholders

Identifier Tooltip Default Value
name Event name EventName

Code

private event EventHandler EventName;

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