Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Defining an Event with Reflection Emit

An event is defined using the TypeBuilder.DefineEvent method. DefineEvent returns an EventBuilder. The DefineEvent method requires the caller to specify the event name, the event attributes (using the EventAttributes enumeration), and the event type.

The EventBuilder class allows the caller to specify the following:

  • The method for the AddOn event.

  • The method for the RemoveOn event.

  • The method for the Raise event.

  • Any other methods.

Community Additions

ADD
Show:
© 2015 Microsoft