Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Defining an Enum with Reflection Emit

Enumerations, or enums, are defined in the scope of a dynamic module using the ModuleBuilder.DefineEnum method. DefineEnum returns an EnumBuilder. Nested enumerations are defined using TypeBuilder.DefineNestedEnum.

An enumeration field is defined using the EnumBuilder.DefineLiteral method.

Before the enumeration is used, the EnumBuilder.CreateType method must be called. CreateType completes the creation of the enumeration.

See Also

Using Reflection Emit

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft