diff --git a/csharp-api/AssemblyGenerator/ClassGenerator.cs b/csharp-api/AssemblyGenerator/ClassGenerator.cs index d0e55e574..f94e4b61b 100644 --- a/csharp-api/AssemblyGenerator/ClassGenerator.cs +++ b/csharp-api/AssemblyGenerator/ClassGenerator.cs @@ -293,6 +293,16 @@ public ClassGenerator(string className_, REFrameworkNET.TypeDefinition t_, REFra nestedTypeName = nestedTypeName.Replace("file", "@file"); } + if (nestedT.IsEnum()) { + var nestedEnumGenerator = new EnumGenerator(nestedTypeName.Split('.').Last(), nestedT); + + if (nestedEnumGenerator.EnumDeclaration != null) { + this.Update(this.typeDeclaration.AddMembers(nestedEnumGenerator.EnumDeclaration)); + } + + continue; + } + HashSet nestedMethods = []; foreach (var method in nestedT.Methods) {