【发布时间】:2016-05-12 14:17:42
【问题描述】:
System.Threading.Tasks.Task myTask = System.Threading.Tasks.Task.Factory.StartNew(() => TestMethodRefresh());
myTask.ContinueWith(() => TestMethodPrint(null), System.Threading.Tasks.TaskScheduler.FromCurrentSynchronizationContext);
private void TestMethodPrint(System.Threading.Tasks.Task task) {
testDiv.InnerHtml = "from continue with";
}
我正在尝试使用在 .net 框架 4.0 vb.net 中运行良好的代码,但我无法在 asp.net .net 框架 4.5 中使用它。我不确定这意味着什么,它不需要 0 个参数。我尝试在 Lamba 中提供额外的参数,但它只是说它也不接受这些额外数量的参数。
【问题讨论】:
标签: c# asp.net .net multithreading