This is my code:
For i As Integer = 0 to 20
mythread = New System.Threading.Thread(AddressOf myfunction)
mythread.Start()
Next
I want to kill all threads that are running myfunction()
I tried:
For Each hello123 As System.Threading.Thread(AddressOf myfunction)
thread.abort(hello123)
Next
But came up with an error (on AddressOf):
Array bounds cannot appear in type specifiers.