Does C++/CLI event have any listeners?
In C# I can check if an event has any listeners: C# Example: public static event EventHandler OnClick; if (OnClick != null) OnClick(null, new EventArgs() ); In C++/CLI checking if the event is null is not necessary. C++/CLI Example: delegate void ClickDelegate( Object^ sender, MyEventArgs^ e ); event ClickDelegate^ OnClick; OnClick (sender, args); BUT, in the project I am working on, I don’t want to construct the MyEventArgs object if there are no listeners. How do I find out if OnClick has any listeners in C++? It seems you can't check that with "trivial events", like you used, because you