有个问题请教各位大佬,task.ContinueWith的后面的方法在声明的时候,是以Task类的对象为参数的,那如果方法自己还有参数,怎么传进去啊?
例如:
public long sumCal2(Task<long> task, int end, int time)
{
for (int i = 1; i <= end; i++)
{
Console.WriteLine(time);
}
return sum;
}
Task<long> task1 = new Task<long>(() => {...});
Task<long> task2 = task1.ContinueWith<long>(???);
问号里面怎么写?
|