I\'ve got an interface with some async functions. Some of the classes that implements the interface does not have anything to await, and some might just throw. It\'s a b
Here is some alternatives depending on your method signature.
public async Task Test1() { await Task.CompletedTask; } public async Task Test2() { return await Task.FromResult(null); } public async Task Test3() { return await Task.FromException(new NotImplementedException()); }