title: Async programmic and virtual functions
body: <p>If I have an interface such as:</p>
  
  <pre><code>using System.Threading.Tasks;
  
  ...
  
  public interface IFoo
  {
    Task doIt();
  
    Task&lt;bool&gt; doItAndReturnStuff();
  }
  </code></pre>
  
  <p>and one of the classes implementing this interface just happens to not require async methods, how can i correct override these functions?</p>
  
  <p>In other words, how do I correctly return "void" and "bool" wrapped in Task objects?</p>
  
  <p>For example:</p>
  
  <pre><code>public class FooHappensToNotNeedAsync : IFoo
  {
    public override Task doIt()
    {
      // If I don't return anything here, I get
      // error that not all code paths return a value.
      // Can I just return null?
    }
  
    public override Task&lt;bool&gt; doItAndReturnStuff()
    {
      // If I want to return true, how to I do it?
      // This doesn't work:
      return true;
    }
  }
  </code></pre>
  
  <p>NOTE - I can't strip the Task stuff completely because some of the classes that implement this interface <em>are</em> in fact asynch.</p>
  
  <p>Thanks</p>