diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 6760952e..711ab958 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -802,6 +802,11 @@ namespace CppSharp.Generators.CSharp private void GeneratePropertySetter(QualifiedType returnType, T decl, Class @class) where T : Declaration, ITypedDecl { + if (!(decl is Function || decl is Field) ) + { + return; + } + PushBlock(CSharpBlockKind.Method); WriteLine("set");