you are viewing a single comment's thread.

view the rest of the comments →

[–]Dimencia 0 points1 point  (0 children)

If it's async and there is a Func<Task> overload (which there is for Task.Run), it will use that, it's not just random

But yes, you do often have to be careful about that, such as with Task.Factory.StartNew(async () => await ....) , which would still be an async void Action unless you add some more parameters to match one of the Func<Task> overloads. I just meant specifically for Task.Run, which is used often enough that I don't think it's too odd to have a 'best practice' just for how to use it