title: What do I return from a method that returns just Task and not Task<T>?
body: <p>What do I return from <code>D4()</code>?</p>
  
  <pre><code>async static Task D4()
  {
      Console.Write("Enter the divisor: ");
      var n = int.Parse(Console.ReadLine());
      Console.WriteLine((24 / n).ToString());
  
      // NONE OF THESE WORK
      // THE COMPILER COMPLAINS WITH AN ERROR THAT SAYS:
      // Since 'Program.D4()' is an async method that returns 'Task', 
      // a return keyword must not be followed by an object expression.
      // Did you intend to return 'Task&lt;T&gt;'?
      // return new TaskCompletionSource&lt;object&gt;().Task;
      // return Task.FromResult&lt;object&gt;(null);
      // return Task.FromResult&lt;bool&gt;(false);
      // return Task.FromResult(0);
  }
  </code></pre>
  
  <p>I asked <a href="https://stackoverflow.com/q/31874517/303685">something similar</a> earlier and it probably worked in my situation then but I have no recollection of the situation now. Also, <a href="https://stackoverflow.com/q/13127177/303685">this thread</a> seems to suggest the same thing that I am trying. I am not sure why it doesn't work in my case.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>For the sake of completeness, here is the whole of the relevant bit of code.</p>
  
  <pre><code>async static Task A4() { await B4(); }
  async static Task B4() { await C4(); }
  async static Task C4() { await D4(); }
  async static Task D4()
  {
      Console.Write("Enter the divisor: ");
      var n = int.Parse(Console.ReadLine());
      Console.WriteLine((24 / n).ToString());
  
      // return new TaskCompletionSource&lt;object&gt;().Task;
      // return Task.FromResult&lt;object&gt;(null);
      // return Task.FromResult&lt;bool&gt;(false);
      // return Task.FromResult(0);
  }
  </code></pre>