C# Task ContinueWith
2021-03-21 08:25
标签:code adl fir continue oid div col ring str C# Task ContinueWith 标签:code adl fir continue oid div col ring str 原文地址:https://www.cnblogs.com/Fred1987/p/11827901.html static void Main(string[] args)
{
Task firstTask = Task.Run(() =>
{
PrintPlus();
});
Task secondTask = firstTask.ContinueWith(x=>
{
Console.WriteLine("\n");
PrintMultiply();
});
Console.ReadLine();
}
static void PrintPlus()
{
for(int i=0;i1000;i++)
{
Console.Write("+\t");
}
}
static void PrintMultiply()
{
for(int i=0;i1000;i++)
{
Console.Write("*\t");
}
}
文章标题:C# Task ContinueWith
文章链接:http://soscw.com/index.php/essay/67092.html