C# Make Task Threads Foreground
<p>I am using Task to create and perform some operations by a different thread, once the operation is done I also have called back to be called.</p>

<pre><code> System.Threading.Tasks.Task.Factory.StartNew(() =&gt;
                   this._httpService.CreateRecord(new Uri(Configuration.Current.CreateRecordUrl), httpObj)).ContinueWith(
                   (response) =&gt;
                   {
                       if (!response.IsFaulted)
                       {
                           if (httpObj.CallBack != null)
                           {
                               httpObj.CallBack(response.Result);
                           }
                       }
                       else {
                           this._logger.Error("There was some error which causes the task to fail");


                       }
                   });
</code></pre>

<p>My console application's main thread is not waiting for the Task thread to complete, because it's background thread.
How can I make task thread <strong>foreground thread</strong>?</p>

<p>Thanks </p>