Click here to Skip to main content
15,919,749 members
Home / Discussions / C#
   

C#

 
QuestionIs it possibe execute 1st-thread method in 2nd async thread? Pin
Monookiev8-Mar-15 4:52
Monookiev8-Mar-15 4:52 
I've got a Timer delegate described method as preparation for a double recursion work and second method with tiny optimized recursion only. I need to execute the recursion in async thread too. But NET.Framework dont do that, only do async preparation method and no recursion method.

C# code
using System.Threading.Timer
...
private void button10_Click(object sender, EventArgs e)
{//Timer
Elem ss = new Elem();//Elem is a structure.
ss.a = "string1";
ss.b = "string2";
TimerCallback timeCB = new TimerCallback(timerex);
System.Threading.Timer t = new System.Threading.Timer(timeCB, ss, 10000, 10000);

}

public static void timerex(object data)
{

string a1 = ((Elem)data).a;
string b1 = ((Elem)data).b;
MessageBox.Show(a1+" "+b1);
timerex2(a1,b1);
}
public static void timerex2(string s1,string s2)
{
MessageBox.Show("Method_in 2 "+s1+s2);
}

How to execute the recursion in async timer thread?
AnswerRe: Is it possibe execute 1st-thread method in 2nd async thread? Pin
OriginalGriff8-Mar-15 5:56
mveOriginalGriff8-Mar-15 5:56 
GeneralRe: Is it possibe execute 1st-thread method in 2nd async thread? Pin
Monookiev8-Mar-15 6:47
Monookiev8-Mar-15 6:47 
GeneralRe: Is it possibe execute 1st-thread method in 2nd async thread? Pin
OriginalGriff8-Mar-15 6:56
mveOriginalGriff8-Mar-15 6:56 
AnswerRe: Is it possibe execute 1st-thread method in 2nd async thread? Pin
OriginalGriff8-Mar-15 7:33
mveOriginalGriff8-Mar-15 7:33 
GeneralRe: Is it possibe execute 1st-thread method in 2nd async thread? Pin
Monookiev8-Mar-15 10:26
Monookiev8-Mar-15 10:26 
QuestionWSDL without Header but requested Pin
Info service8-Mar-15 0:02
Info service8-Mar-15 0:02 
AnswerRe: WSDL without Header but requested Pin
Richard MacCutchan8-Mar-15 2:11
mveRichard MacCutchan8-Mar-15 2:11 
GeneralRe: WSDL without Header but requested Pin
Info service8-Mar-15 5:52
Info service8-Mar-15 5:52 
QuestionPlease help me, run-time design on buttons. Pin
Member 114460807-Mar-15 16:59
Member 114460807-Mar-15 16:59 
GeneralRe: Please help me, run-time design on buttons. Pin
Kornfeld Eliyahu Peter7-Mar-15 19:43
professionalKornfeld Eliyahu Peter7-Mar-15 19:43 
AnswerRe: Please help me, run-time design on buttons. Pin
Richard MacCutchan7-Mar-15 22:14
mveRichard MacCutchan7-Mar-15 22:14 
AnswerRe: Please help me, run-time design on buttons. Pin
BillWoodruff8-Mar-15 2:33
professionalBillWoodruff8-Mar-15 2:33 
QuestionDeskBand alternatives C# Pin
Member 108502537-Mar-15 8:00
Member 108502537-Mar-15 8:00 
AnswerRe: DeskBand alternatives C# Pin
Ravi Bhavnani7-Mar-15 8:55
professionalRavi Bhavnani7-Mar-15 8:55 
GeneralRe: DeskBand alternatives C# Pin
Member 108502537-Mar-15 9:06
Member 108502537-Mar-15 9:06 
AnswerRe: DeskBand alternatives C# Pin
Brisingr Aerowing7-Mar-15 9:40
professionalBrisingr Aerowing7-Mar-15 9:40 
GeneralRe: DeskBand alternatives C# Pin
Member 108502537-Mar-15 10:18
Member 108502537-Mar-15 10:18 
GeneralRe: DeskBand alternatives C# Pin
manchanx7-Mar-15 10:26
professionalmanchanx7-Mar-15 10:26 
JokeRe: DeskBand alternatives C# Pin
Richard Andrew x647-Mar-15 10:36
professionalRichard Andrew x647-Mar-15 10:36 
GeneralRe: DeskBand alternatives C# Pin
manchanx7-Mar-15 10:48
professionalmanchanx7-Mar-15 10:48 
GeneralRe: DeskBand alternatives C# Pin
Member 108502537-Mar-15 11:25
Member 108502537-Mar-15 11:25 
GeneralRe: DeskBand alternatives C# Pin
manchanx7-Mar-15 12:21
professionalmanchanx7-Mar-15 12:21 
Questioni need help............ Pin
Member 115043336-Mar-15 22:52
Member 115043336-Mar-15 22:52 
GeneralRe: i need help............ Pin
Richard MacCutchan6-Mar-15 23:20
mveRichard MacCutchan6-Mar-15 23:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.