diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 1af20317..e45fb9f5 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -649,6 +649,12 @@ namespace CppSharp.Generators.CSharp if (decl is Function) { var function = decl as Function; + + if (function.Parameters.Count == 0) + throw new NotSupportedException("Expected at least one parameter in setter"); + + param.QualifiedType = function.Parameters[0].QualifiedType; + var parameters = new List { param }; GenerateInternalFunctionCall(function, parameters); }