Snippet: public event

property value
IDE Visual Studio
Language C#
Title public event
Shortcut et
Description public event declaration
Snippet Types Expansion
Namespaces System

Placeholders

Identifier Tooltip Default Value Editable Function Type Name
name Event name EventName yes

Code

public event EventHandler EventName;

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