diff --git a/src/Generator/Generators/CSharp/CSharpSources.cs b/src/Generator/Generators/CSharp/CSharpSources.cs index 68a25dab..30145f00 100644 --- a/src/Generator/Generators/CSharp/CSharpSources.cs +++ b/src/Generator/Generators/CSharp/CSharpSources.cs @@ -1293,7 +1293,7 @@ internal static bool {Helpers.TryGetNativeToManagedMappingIdentifier}(IntPtr nat ptr = $"*{ptr}"; pointerType = pointerType.Pointee.Desugar() as PointerType; } - ptr = $"(IntPtr*)({ptr})"; + ptr = $"({TypePrinter.IntPtrType}*)({ptr})"; } var arrayType = var.Type.Desugar() as ArrayType;