diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 6454db61..13749b14 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -214,7 +214,7 @@ namespace CppSharp.Generators.CSharp { PushBlock(CSharpBlockKind.Functions); WriteLine("public unsafe partial class {0}", - TranslationUnits[0].FileNameWithoutExtension); + context.TranslationUnit.FileNameWithoutExtension); WriteStartBraceIndent(); PushBlock(CSharpBlockKind.InternalsClass);