Presenting EventHandlerHelper

Being bored of writing code to raise an event, i have added an EventHandlerHelper to BeTimvwFramework.

public static class EventHandlerHelper
{
 [MethodImpl(MethodImplOptions.NoInlining)]
 public static void Raise<t>(EventHandler<t> handler, object sender, T e)
  where T : EventArgs
 {
  if (handler != null)
  {
   handler(sender, e);
  }
 }
}

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>