Task类的构造函数接收一个无参无返回值的委托:
1: Task task = new Task(TaskMethod);
2: task.Start();
例子: task = new Task(() =>
{
方法1,方法2....;
});
if (task != null)
{
task.Start();
}
Task类的构造函数接收一个无参无返回值的委托:
1: Task task = new Task(TaskMethod);
2: task.Start();
例子: task = new Task(() =>
{
方法1,方法2....;
});
if (task != null)
{
task.Start();
}