my current solution as you can see is by using shared variable within a class in order to pass a value.
on the form load of my application i called: workerSample.RunWorkerAsync
Dim finalList As List(Of String)
Private Sub workerSample_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles workerSample.DoWork
Dim xList As New List(Of String)
'long process of finding folder which contains executable files
finalList = xList
End Sub
Private Sub workerSample_RunWorkerCompleted(ByVal sender As System.Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles workerSample.RunWorkerCompleted
'do something with finalList
End Sub
is there another way to pass xList variable to RunWorkerCompleted by using an argument?
1 Answer