Hi,
I'm writing my custom events in C++/CLI (I pretty much only care about the add/remove methods) as such:
event EventHandler<XyzEventArgs^> ^Xyz
{
void add(EventHandler<XyzEventArgs^> ^handler);
void remove(EventHandler<XyzEventArgs^> ^handler);
void raise(Object ^sender, XyzEventArgs ^e);
}
Everything works great, but when I look at Intellisense under C#, it shows an ugly-looking public raise_Xyz method.
Any ideas on how to hide that without making my events private?
Any help greatly appreciated.
EDIT:
I was able to eliminate the public raise_Xyz methods by marking them with a different visibility modifier (internal in my case). This pretty much means that the events cannot be raised from outside of the class. That's fine with me. I have noticed, however, that even simple events
public: event EventHandler ^XXX;
generate raise_XXX methods and they are protected. Is there any way of preventing that from happening?