Possible Duplicate:
Returning a value from thread?
I have this code:
//Asynchronously start the Thread to process the Execute command request.
Thread objThread = new Thread(new ParameterizedThreadStart(ExecuteCommandSync));
//Make the thread as background thread.
objThread.IsBackground = true;
//Set the Priority of the thread.
objThread.Priority = ThreadPriority.AboveNormal;
//Start the thread.
objThread.Start(command);
The problem is that ExecuteCommandSync
returns a string.
How can i capture the string that is returned and return it?