In C# I can get Visual Studio to keep the delegate\'s argument names.
For example if I have:
public delegate void Blah(object myArg);
public event Blah Foo
The question has no hint at the real problem and I could not get a repro. But later realized what might be happening, the C++ compiler is different from other managed compilers, and MSIL, it doesn't require parameters to be named in declarations. That panned out:
namespace CppClassLibrary {
public ref class Example {
public:
delegate void Blah(int, int, int, int);
event Blah^ Foo;
};
}
Produces this auto-generated event handler in C#:
void test_Foo(int A_0, int A_1, int A_2, int A_3) {
throw new NotImplementedException();
}
Looks like a slamdunk explanation. You simply forgot to name the parameters in the delegate declaration, the C++ compiler is forced to synthesize them in order to write correct MSIL. Easy to fix of course.