I want to use multithreading for the first time as I understood, there is 2 laws to respect: -Threads can be used only with void's -One cannot use Threads to change something in a windows form(unless you use delegates).
So I code my macro by respect to this rule, here is my code :
public void exec_RT(string tickername, bool isSubIndex)
{
DataTable RT_dt = Price_dt(tickrname, isSubIndex);
Infragistics.Win.UltraWinChart.UltraChart toplot = new Infragistics.Win.UltraWinChart.UltraChart();
toplot = forms.Real_timeAlpha;
configgraph(RT_dt, toplot);
}
My problem is that the function Price_dt return a datatable :
public DataTable Price_dt(string tickername, bool isSubIndex)
{
DoMyThing();
return real_time;
}
So my question is how can I make a void return a datatable ?
Thanks