diff --git a/src/cs/examples/helloworld/helloworld-app/Generated/AssemblyAttributes.g.cs b/src/cs/examples/helloworld/helloworld-app/Generated/AssemblyAttributes.g.cs
index 95945a4e..c75b17d1 100644
--- a/src/cs/examples/helloworld/helloworld-app/Generated/AssemblyAttributes.g.cs
+++ b/src/cs/examples/helloworld/helloworld-app/Generated/AssemblyAttributes.g.cs
@@ -1,6 +1,6 @@
//
-// This code was generated by the following tool on 2025-01-03 14:27:37 GMT-05:00:
-// https://github.com/bottlenoselabs/c2cs (v2025-01-03 14:27:37 GMT-05:00)
+// This code was generated by the following tool on 2025-01-03 14:36:43 GMT-05:00:
+// https://github.com/bottlenoselabs/c2cs (v2025-01-03 14:36:43 GMT-05:00)
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
//
diff --git a/src/cs/examples/helloworld/helloworld-app/Generated/Runtime.g.cs b/src/cs/examples/helloworld/helloworld-app/Generated/Runtime.g.cs
index 29d549d2..0490ddb0 100644
--- a/src/cs/examples/helloworld/helloworld-app/Generated/Runtime.g.cs
+++ b/src/cs/examples/helloworld/helloworld-app/Generated/Runtime.g.cs
@@ -1,5 +1,5 @@
//
-// This code was generated by the following tool on 2025-01-03 14:27:37 GMT-05:00:
+// This code was generated by the following tool on 2025-01-03 14:36:43 GMT-05:00:
// https://github.com/bottlenoselabs/c2cs (v0.0.0.0)
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
diff --git a/src/cs/examples/helloworld/helloworld-app/Generated/my_c_library.g.cs b/src/cs/examples/helloworld/helloworld-app/Generated/my_c_library.g.cs
index 520eb7d5..c246b8e1 100644
--- a/src/cs/examples/helloworld/helloworld-app/Generated/my_c_library.g.cs
+++ b/src/cs/examples/helloworld/helloworld-app/Generated/my_c_library.g.cs
@@ -1,5 +1,5 @@
//
-// This code was generated by the following tool on 2025-01-03 14:27:37 GMT-05:00:
+// This code was generated by the following tool on 2025-01-03 14:36:43 GMT-05:00:
// https://github.com/bottlenoselabs/c2cs (v0.0.0.0)
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
@@ -63,7 +63,7 @@ public enum hw_my_enum_week_day : int
}
[StructLayout(LayoutKind.Sequential)]
- public struct FnPtr_CString_Void
+ public partial struct FnPtr_CString_Void
{
public delegate* unmanaged Pointer;
diff --git a/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorAliasType.cs b/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorAliasType.cs
index cb8c4b2e..b88704a3 100644
--- a/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorAliasType.cs
+++ b/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorAliasType.cs
@@ -20,7 +20,7 @@ protected override string GenerateCode(
var code = $$"""
[StructLayout(LayoutKind.Explicit, Size = {{sizeOf}}, Pack = {{alignOf}})]
- public struct {{nameCSharp}}
+ public partial struct {{nameCSharp}}
{
[FieldOffset(0)]
public {{underlyingTypeNameCSharp}} Data;
diff --git a/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorFunctionPointer.cs b/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorFunctionPointer.cs
index 2adf7915..42c78797 100644
--- a/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorFunctionPointer.cs
+++ b/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorFunctionPointer.cs
@@ -31,7 +31,7 @@ private string GenerateCodeFunctionPointer(
var code = $$"""
[StructLayout(LayoutKind.Sequential)]
- public struct {{name}}
+ public partial struct {{name}}
{
public delegate* unmanaged<{{parameterTypesAndReturnTypeString}}> Pointer;
@@ -51,7 +51,7 @@ private string GenerateCodeDelegate(
var code = $$"""
[StructLayout(LayoutKind.Sequential)]
- public struct {{name}}
+ public partial struct {{name}}
{
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate {{node.ReturnType.Name}} @delegate({{parameterTypesString}});
diff --git a/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorOpaqueType.cs b/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorOpaqueType.cs
index 93f744f5..bb54d3ba 100644
--- a/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorOpaqueType.cs
+++ b/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorOpaqueType.cs
@@ -16,7 +16,7 @@ protected override string GenerateCode(
{
var code = $$"""
[StructLayout(LayoutKind.Sequential)]
- public struct {{nameCSharp}}
+ public partial struct {{nameCSharp}}
{
}
""";
diff --git a/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorStruct.cs b/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorStruct.cs
index 3155d418..73cd2c21 100644
--- a/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorStruct.cs
+++ b/src/cs/production/c2cs.Tool/GenerateCSharpCode/Generators/GeneratorStruct.cs
@@ -19,7 +19,7 @@ protected override string GenerateCode(string nameCSharp, CodeGeneratorContext c
var code = $$"""
[StructLayout(LayoutKind.Explicit, Size = {{record.SizeOf}}, Pack = {{record.AlignOf}})]
- public struct {{nameCSharp}}
+ public partial struct {{nameCSharp}}
{
{{membersCode}}
}