Tim Van Wassenhove

Passionate geek, interested in Technology. Proud father of two

01 Sep 2008

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);
		}
	}
}