Answers for "How to determine whether Task.Run is completed within a loop in c#"

C#
0

How to determine whether Task.Run is completed within a loop in c#

System.Threading.Tasks.Task
.Run(() => 
{
    // simulate processing
    for (var i = 0; i < 10; i++)
    {
        Console.WriteLine("do something {0}", i + 1);
    }
})
.ContinueWith(t => Console.WriteLine("done."));
Posted by: Guest on September-29-2020

Code answers related to "How to determine whether Task.Run is completed within a loop in c#"

C# Answers by Framework

Browse Popular Code Answers by Language