2
Answers

why this method doesn't output anything? I

Photo of Ram M

Ram M

2y
571
1

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?

foreach(var i in arr) 
            await Task.Run(() => {
                Task.Delay(i * 100);
                Console.WriteLine(i);
            });

Answers (2)