Current .Net Version: 2.0.50727
Home
Articles
C# & .Net Framework Reference
Practice C# Online
XML Web Services
RSS Feeds
Code Snippets
T-SQL Scripts
Videos
Valuable Links
Contact Us
Mike's C#, VS.NET and SQL Blog




ROR XML Info.
C# & .Net Framework Reference
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

 
COPYRIGHT/DISCLAIMER | CONTACT US