I am trying to use Func with Async Method. And I am getting an error.
Cannot convert async lambda expression to delegate type \'Func
\'Func
Inside the Func run the task, wait for it and check for exception, then return the result.
Func myFun = () => { var t = Task.Run(async () => await myTask); t.Wait(); if (t.IsFaulted) throw t.Exception; return t.Result; };