diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index b39c7fef..92581e1b 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -2052,6 +2052,9 @@ namespace CppSharp.Generators.CSharp if (!function.IsProcessed || function.ExplicityIgnored) return; + if (function.OriginalFunction != null) + function = function.OriginalFunction; + PushBlock(CSharpBlockKind.InternalsClassMethod); GenerateDeclarationCommon(function); WriteLine("[SuppressUnmanagedCodeSecurity]");