private void StartSqlServer() { var o = new BackgroundThread(); var thread = new Thread(new ThreadStart(o.StartSqlServer)); thread.Start(); // Spin for a while waiting for the started thread to become alive while (!thread.IsAlive); }