await Task.Run(() => {
Task.Delay(i * 100);
Console.WriteLine(i);
});
why this method doesn't output anything? I did the same thing with the threads and it worked but this way doesn't wok. Do am I missing something?
Please format the code you posted, by wrapping it in triple backticks. -> `
What are you trying to do? Use Parallel.Foreach
I suppose that the main thread closes earlier than all these tasks and causes such behaviour
Обсуждают сегодня