Task
instead of void
for async methods with no return valueTask
instead of void
. Returning void makes it difficult/impossible to handle exceptions, test, and write continuations.public async void DoSomethingAsync() { ... }
public async Task DoSomethingAsync() { ... }