Enums are defined in the scope of a dynamic module using the ModuleBuilder.DefineEnum method. DefineEnum returns an EnumBuilder object. Nested enums are defined using TypeBuilder.DefineNestedEnum.
An enum’s field is defined using the EnumBuilder.DefineLiteral method.
Before the enum is used, the EnumBuilder.CreateType method must be called. CreateType completes the creation of the enum.