I am trying to get the sample C# code on this page to work:
https://online-help.tradingtechnologies.com/TT_API...
But am getting these two error messages:
No overload for 'pls_Update' matches delegate 'System.EventHandler'
and
No overload for 'ics_InstrumentsUpdated' matches delegate 'System.EventHandler'
I suspect I am missing something very simple. Please advise.
Answer by Zack · Mar 15, 2017 at 07:25 PM
Hello Daniel,
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);
Glad to hear that that helped. I should have also mentioned that you can see all functionality in action if you download our C# Samples and checkout the 12_MarketExplorer sample.
Ask questions and share ideas about the TT® and X_TRADER® platforms.
First time here? See our Getting Started Guide and FAQs.
© 2017 Trading Technologies International, Inc. All rights reserved.
Powered by AnswerHub