How to: Hook Up a Delegate Using Reflection
Full Name:
How to: Hook Up a Delegate Using Reflection
Short Name:
How to: Hook Up a Delegate Using Reflection
Type of Entity:
C#
Abstract:
When you use reflection to load and run assemblies, you cannot use language features like the C# += operator or the Visual Basic AddHandler Statement to hook up events. The following procedures show how to hook up an existing method to an event by getting all the necessary types through reflection, and how to create a dynamic method using reflection emit and hook it up to an event.
MSDN Source URL:
http://msdn2.microsoft.com/ms228976.aspx