If I have code like this:
try
{
Thread t = new Thread(new ThreadStart(wc.LocalRunProcess));
t.IsBackground = true;
t.Start();
}
catch (Exception ex)
{
//do something with ex
}
Will the exception thrown by thread t be caught in the catch block?
No. It will not catch any exceptions in your other thread
t. You will have to catch them in that thread and deal with them appropriately.However, I believe the AppDomain’s UnhandedException event will report it.