Visual Studio: Visual Studio sample snippet
A snippet sample in VS2005 format ... Reveal Code
Event with custom delegate evnt2 Code snippet for event Romashka Expansion EventName Event name OnSomethingHappens args Event arguments CustomEventArgs sender Event sender sender args_desc EventArgs description arguments param_type EventArgs param type int param_name EventArgs param name id param_desc EventArgs param description id of something description Event description something happens /// Delegate for $EventName$ event /// /// $sender$ /// $args_desc$ public delegate void $EventName$EventHandler(object sender, $args$ e); #endregion #region public event $EventName$EventHandler $EventName$; ///
/// Raised when $description$ /// public event $EventName$EventHandler $EventName$; #endregion #region protected void On$EventName$($param_type$ $param_name$) ////// Raise $EventName$ event /// /// $param_desc$ protected void On$EventName$($param_type$ $param_name$) { if ($EventName$ != null) $EventName$(this, new $EventName$EventArgs($param_name$)); } #endregion #endregion ]]>