I am trying to create a new thread using an anonymous function but I keep getting errors. Here is my code:
New Thread(Function()
'Do something here
End Function).Start
Here are the errors I get:
New:
Syntax Error
End Function:
‘End Function’ must be preceded by a matching ‘Function’.
There’s two ways to do this;
With the
AddressOfoperator to an existing methodAnd then create and start the thread with;
Or as a lambda function.