I want to create a class with a nested enum.
public class Foo
{
public enum Views
{
}
}
However System.Reflection.Emit.TypeBuilder class has no DefineNestedEnum only DefinedNestedType. ModuleBuilder.DefineEnum exists that let's me create an enum but I find no way to make it nested. Can I create an enum without faking it (i.e., using EnumBuilder)?
I moved my solution to an answer below.