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;
Then when I add a method to the event, Visual Studio UI automatically keeps the names and creates the method:
void Form1_Foo(object myArg);
But, if I declare a delegate in C++/CLI:
public:
delegate void Blah(Object^ myArg);
event Blah^ Foo;
it doesn't keep the names and creates a method with nonsense names:
void Form1_Foo(object A_0)
How can I set meaningful names to the argument in C++/CLI ?
EDIT (Added ildasm results):
C++ CLI event:
.method public hidebysig specialname instance void
Invoke(object myArg) cil managed
{
} // end of method Blah::Invoke
C# event:
.method public hidebysig newslot virtual
instance void Invoke(object myArg) runtime managed
{
} // end of method Blah::Invoke