diff --git a/Source/generator/ClassBase.cs b/Source/generator/ClassBase.cs index 09a84b6d1..fed3c4a79 100644 --- a/Source/generator/ClassBase.cs +++ b/Source/generator/ClassBase.cs @@ -195,7 +195,7 @@ namespace GtkSharp.Generation { if (cs_parent_struct == "") sw.WriteLine ("\t\tpublic static uint instance_offset { get { return 0; }}"); else - sw.WriteLine ("\t\tpublic static uint instance_offset {{ get {{ return ((uint) Marshal.SizeOf(typeof ({0})) + {1}.instance_offset); }} }}", cs_parent_struct, cs_parent); + sw.WriteLine ("\t\tpublic static new uint instance_offset {{ get {{ return ((uint) Marshal.SizeOf(typeof ({0})) + {1}.instance_offset); }} }}", cs_parent_struct, cs_parent); } protected void GenerateStructureABI (GenerationInfo gen_info) diff --git a/Source/generator/StructBase.cs b/Source/generator/StructBase.cs index dbcbc62bc..861d10faf 100644 --- a/Source/generator/StructBase.cs +++ b/Source/generator/StructBase.cs @@ -64,7 +64,7 @@ namespace GtkSharp.Generation { if (cs_parent_struct == "") sw.WriteLine ("\t\tpublic uint instance_offset { get { return 0; }}"); else - sw.WriteLine ("\t\tpublic override uint instance_offset {{ get {{ return ((uint) Marshal.SizeOf(typeof ({0})) + base.instance_offset); }} }}", cs_parent_struct); + sw.WriteLine ("\t\tpublic new uint instance_offset {{ get {{ return ((uint) Marshal.SizeOf(typeof ({0})) + base.instance_offset); }} }}", cs_parent_struct); } public override string DefaultValue {