title: C# Background Thread
body: <p>Let me describe what I am trying to achieve. I am programming in C#.</p>
  
  <p>I have a function (method) DoCalculations(). I want to call this DoCalculations() method recursively. However, in C# I get exception as unhandled exception System.StackOverflow.
  So, I am trying to run DoCalculations() method on a back ground thread. </p>
  
  <p>On FORM LOAD event. I have done following:- </p>
  
  <pre><code>Thread objThread = new Thread(new ThreadStart(DoCalculations));
  </code></pre>
  
  <p>On START BUTTON CLICK event. I am starting the Thread as follows.</p>
  
  <pre><code> objThread.IsBackground = true;
      objThread.Start();
      while (!objThread.IsAlive)
      {
      }
  </code></pre>
  
  <p>And I intend to run method DoCalculations() continuously with above While Loop.</p>
  
  <pre><code>DoCalculations()
  {
  //some calculations.
  
  }
  </code></pre>
  
  <p>I do get control in DoCalculations() method one time. However, I want to do this every instant. </p>
  
  <p>Please if any one can assist me with regards to back ground thread, or is there any better way to achieve to do parallel computation. </p>
  
  <p>I have used above approach in VB.NET, making me more confused why its not working in C#.NET</p>
  
  <p>Any assistance, comments greatly appreciated.</p>
  
  <p>Thanks
  AP</p>