I'm using VS2019 and dotnetcore 3.1 for a simple console application, I've this code piece:
public static async Task F()
{
await Task.Delay(1000);
return Task.CompletedTask; // error
}
It doesn't compile. I just with to create a method that is (1) async, and (2) returns a Task. Why this return statement doesn't compile? How to fix it to fulfill my requirement of (1) and (2)?
Thanks a lot.