Convert from Type to TypeBuilder
问题 I'm creating a class on runtime and some of the types are already created inside the ModuleBuilder and I would like to reused them, but I only have the Type and not the TypeBuilder (Which is what I need in order to change it) Is there a way to convert from Type to TypeBuilder? Type moduleType = ModuleBuilder.GetType(inXmlTemplateProperty.PropertyName); if (moduleType == null) { TypeBuilder newClass = ModuleBuilder.DefineType(inXmlTemplateProperty.PropertyName, TypeAttributes.Public |