diff --git a/src/Generator/Generators/CSharp/CSharpMarshal.cs b/src/Generator/Generators/CSharp/CSharpMarshal.cs index 45041a78..c26a82a6 100644 --- a/src/Generator/Generators/CSharp/CSharpMarshal.cs +++ b/src/Generator/Generators/CSharp/CSharpMarshal.cs @@ -476,7 +476,7 @@ namespace CppSharp.Generators.CSharp } else - Context.Return.Write(Context.Parameter.Name); + Context.Return.Write(Helpers.SafeIdentifier(Context.Parameter.Name)); return true; } @@ -632,7 +632,7 @@ namespace CppSharp.Generators.CSharp public override bool VisitEnumDecl(Enumeration @enum) { - Context.Return.Write(Context.Parameter.Name); + Context.Return.Write(Helpers.SafeIdentifier(Context.Parameter.Name)); return true; }