diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index 145a5739..5cdd0981 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -152,6 +152,16 @@ namespace CppSharp.Generators.CSharp if (TypePrinterContext.Parameter != null) return string.Format("global::System.IntPtr"); + Enumeration @enum; + if (arrayType.TryGetEnum(out @enum)) + { + return new CSharpTypePrinterResult + { + Type = string.Format("fixed {0}", @enum.BuiltinType), + NameSuffix = string.Format("[{0}]", array.Size) + }; + } + Class @class; if (arrayType.TryGetClass(out @class)) { diff --git a/tests/Common/Common.h b/tests/Common/Common.h index 1ff5e7c2..818425e0 100644 --- a/tests/Common/Common.h +++ b/tests/Common/Common.h @@ -84,6 +84,7 @@ struct DLL_API Bar Item RetItem1() const; int A; float B; + Item fixedEnumArray[3]; Bar* returnPointerToValueType();