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
Just as an update to Stephen's Answer, you no longer need to write the TaskConstants class as there is a new helper method:
TaskConstants
public Task ThrowException() { try { throw new NotImplementedException(); } catch (Exception e) { return Task.FromException(e); } }