title: Using Func delegate with Async method
body: <p>I am trying to use Func with Async Method. And I am getting an error.</p>
  
  <blockquote>
    <p>Cannot convert async lambda expression to delegate type <code>'Func&lt;HttpResponseMesage&gt;'</code>. An async lambda expression may return void, Task or <code>Task&lt;T&gt;</code>, none of which are convertible to <code>'Func&lt;HttpResponseMesage&gt;'</code>.    </p>
  </blockquote>
  
  <p>below is my Code:</p>
  
  <pre><code>public async Task&lt;HttpResponseMessage&gt; CallAsyncMethod()
  {
      Console.WriteLine("Calling Youtube");
      HttpClient client = new HttpClient();
      var response = await client.GetAsync("https://www.youtube.com/watch?v=_OBlgSz8sSM");
      Console.WriteLine("Got Response from youtube");
      return response;
  }
  
  static void Main(string[] args)
  {
      Program p = new Program();
      Task&lt;HttpResponseMessage&gt; myTask = p.CallAsyncMethod();
      Func&lt;HttpResponseMessage&gt; myFun =async () =&gt; await myTask;
      Console.ReadLine();
  }
  </code></pre>