Dim listOfTask = New List(Of Task)
For Each account In uniqueAccounts().Values
Dim newtask = account.conditionalInitializeAsync()
Dim nexttask = account.getPairsPriceStepAsync()
listOfTask.Add(newtask)
listOfTask.Add(nexttask)
Dim nexttaskaftenewtask = newtask.ContinueWith(nexttask) 'compiler warning
Next
代替列表
listOfTask.Add(newtask)
listOfTask.Add(nexttask)
我想做
listOfTask.Add(nexttaskaftenewtask )
我该怎么做?
答案 0 :(得分:1)
我可以编译以下内容,而不会出现错误或警告。希望这会有所帮助。
Dim nexttaskaftenewtask = newtask.ContinueWith(New Action(Of Task)(Function() nexttask))