G
Guest
How can I pass parameters to a procedure which is called in thread?
'! Spin off a new thread.
myThread = New Thread(New ThreadStart(AddressOf GetRawFigures))
myThread.IsBackground = True
myThread.Start()
Procedure GetRawFigures takes an argument as follows:
Private Sub GetRawFigures(ByVal figures As Integer())
End Sub
When I try to provide it as
myThread = New Thread(New ThreadStart(AddressOf GetRawFigures(intArray))
I get an error saying " 'AddressOf' operand must be the name of a method; no
parentheses are needed."
How can I fix this? Thanks.
'! Spin off a new thread.
myThread = New Thread(New ThreadStart(AddressOf GetRawFigures))
myThread.IsBackground = True
myThread.Start()
Procedure GetRawFigures takes an argument as follows:
Private Sub GetRawFigures(ByVal figures As Integer())
End Sub
When I try to provide it as
myThread = New Thread(New ThreadStart(AddressOf GetRawFigures(intArray))
I get an error saying " 'AddressOf' operand must be the name of a method; no
parentheses are needed."
How can I fix this? Thanks.