I want to create a completed Task
(not Task<T>
). Is there something built into .NET to do this?
A related question: Create a completed Task<T>
The newest version of .Net (v4.6) is adding just that, a built-in Task.CompletedTask:
Task completedTask = Task.CompletedTask;
That property is implemented as a no-lock singleton so you would almost always be using the same completed task.