I want create a task, which itself calls a async method.
var task = new Task(async () => {
var res = await asyncMethod();
Console.WriteLine("Async");
});
task.start();
Task.WaitAll(task);
Console.WriteLine("Finished");
When running this code "Finished" is returned before "Async". I guess its because the async lambda is executed independendly from the created task. Is it possible in a task to wait for another async method?