title: How to avoid waiting for a method to finish in c#?
body: <p>I am writing a code in c# where I want to call a method which has a loop in it and call another method after that. The problem is that the loop in the first method runs for the duration of the program and so the second method cannot be called because the first method is never completed.</p>
  
  <p>Example:</p>
  
  <pre class="lang-cs prettyprint-override"><code>
  private void Menu()
  {
   Game();
   Movement();
  }
  
  private void Game()
  {
   do
   {
    // some code inside the loop
   } while (x &gt; 9);
  }
  
  private void Movement()
  {
   // some other code
  }
  
  </code></pre>