I have just read about special cases in console projects. Could you tell me whether my approach is right. Two jobs there i am not sure whether i should just use await inside Task.Run as i did here, if it is correct can you explain what would be the diffrence if i would delete both awaits from here. Next question what if i would remove .Wait() from WhenAny. Generally is it correct approach in console apps? Forget about proposing async Main so far, let's talk with void.
public class Program
{
public static void Main()
{
//jobs can work in parael not blocking program
var job0 = Task.Run(async () => await new DoThisAsync().Run());
var job1 = Task.Run(async () => await new DoThatAsync().Run());
//Any Independent synchronous work can run meantime jobs
IndependentSynchronousMethod;
//We wait on tasks
Task.WhenAll(job0, job1).Wait();
}
}