event


Snippet Details

Shortcut
event
Description
Code snippet for event declaration and method for raising it
Language
csharp
Types
Expansion
Author
Fons Sonnemans
Upload on
25-10-2013 13:56:45
Downloads
2780

Declarations

ID ToolTip Default
eventname Event name, either NounVerbing or Verbing for pre-events, or NounVerbed or Verbed for post-events NounVerbed

Code Output

        public event EventHandler $eventname$;
 
        protected virtual void On$eventname$()
        {
            var handler = $eventname$;
            if (handler != null)
            {
                handler(this, EventArgs.Empty);
            }
        }
    

Download Add to .VSIX Package


comments powered by Disqus

Extension Package

No snippets are added


Languages