title: How do I avoid async void?
body: <p>Note:  Turns out this issue is specific to Unity.</p>
  <p><a href="https://stackoverflow.com/a/13159176/1889720">I read that <code>async void</code> was to be avoided.</a>  I am trying to do so using <code>Result</code>, but my application keeps locking up.  How can I avoid using async void?</p>
  <pre><code>public async void PrintNumberWithAwait()
  {
      int number = await GetNumber();
      Debug.Log(number); //Successfully prints &quot;5&quot;
  }
  
  public void PrintNumberWithResult()
  {
      int number = GetNumber().Result;
      Debug.Log(number); //Application Freezes
  }
  
  private async Task&lt;int&gt; GetNumber()
  {
      await Task.Delay(1000);
      return 5;
  }
  </code></pre>
  <p>I thought this was correct, but I must be missing something.  How do I use async/await without having <code>async void</code>?</p>
  <p>I ran my tests separately with the following code (commented one out at a time):</p>
  <pre><code>PrintNumberWithAwait();
  PrintNumberWithResult();
  </code></pre>