I am trying to get the sample C# code on this page to work:
But am getting these two error messages:
No overload for 'pls_Update' matches delegate 'System.EventHandler'
No overload for 'ics_InstrumentsUpdated' matches delegate 'System.EventHandler'
I suspect I am missing something very simple. Please advise.
Answer by Zack · Mar 15 at 07:25 PM
Worry not, the solution is small but it isn't exactly what I would call simple. When assigning a delegate to an API event, you need to pass in a type parameter of the specific type of event args for the event handler.
pls.Update += new EventHandler<ProductLookupSubscriptionEventArgs>(pls_Update); . . . ics.InstrumentsUpdated += new EventHandler <InstrumentCatalogUpdatedEventArgs>(ics_InstrumentsUpdated);