Reputation: 33060
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
Instead of list
listOfTask.Add(newtask)
listOfTask.Add(nexttask)
I want to do
listOfTask.Add(nexttaskaftenewtask )
How do I do so?
Upvotes: 0
Views: 114
Reputation: 564
I can compile the following without error or warning. Hope this helps.
Dim nexttaskaftenewtask = newtask.ContinueWith(New Action(Of Task)(Function() nexttask))
Upvotes: 1