From 972e08ba67998a78cfea2c990735f3a5d2e06407 Mon Sep 17 00:00:00 2001 From: Stephen Kennedy Date: Wed, 30 Oct 2013 13:52:07 +0000 Subject: [PATCH] We only handle functions and fields in property setters --- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 5 +++++ 1 file changed, 5 insertions(+) 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");