event

There are 2 entries for the tag event
Community Days 2012–Milano

Next upcoming event of interest: Technorati's Tag: Event,Community Days 2012

posted @ Friday, December 16, 2011 5:34 PM | Feedback (0)

Snippets code #1 - Extension method to raise an event via reflection

This extension method, applied to the object class and then available for all classes, allows to raise any events via reflection, providing as parameters the event name (as a string) and the TEvenArgs generic parameter. public static void Raise<TEventArgs>(this object source, string eventName, TEventArgs eventArgs) where TEventArgs : EventArgs { var eventInfo = source.GetType().GetEvent(eventName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); ...

posted @ Friday, September 23, 2011 12:00 AM | Feedback (0)