【发布时间】:2015-02-13 22:55:39
【问题描述】:
我想做
async Task DoSomething()
{
await SomeAsyncAPI();
}
async void Run()
{
await DoSomething();
DoAnother();
}
但是 IBackgroundTask 类中不允许有任务类型。我希望 DoAnother() 在 DoSomething 完成后运行。
【问题讨论】:
-
你目前的做法有什么问题?
-
这是错误,因为 IBackgroundTask 类中不允许任务类型
-
类中不允许,继承自IBackgroundTask
标签: c# .net windows-runtime task-parallel-library async-await