I am updating the old managed C ++ code with the following lines:
instanceOfEventSource->add_OnMyEvent(
new EventSource::MyEventHandlerDelegate(this, MyEventHandlerMethod) );
Where
- EventSource is a class that publishes events
- instanceOfEventSource is an instance of this class
- EventSource :: MyEventHandlerDelegate is the type of delegate for the event
- MyEventHandlerMethod is a (non-static) method in the current class (from which "this" is an instance) with signatures matching EventSource :: MyEventHandlerDelegate
What is the correct syntax for this in C ++ / CLI?
source
share