I’m trying to create a new thread and send multiple parameters as well as a delegate to report back.
In VB8 I always hate to do this because it requires either introducing a new class/structure or a delegate.
Is there any better way to do this in VB9 ?
I’m looking for a solution something like this :
Dim Th As New Thread(AddressOf DoStuff)
Th.Start(param1, param2, AddressOf ReportStatus)
I’m not good with LINQ and Lambda, so I’m hopping that someone will show me some cool trick to do this.
You could pass an anonymous function to the thread constructor.
but unfortunately there are no anonymous subs in VB9 (they will be in VB10 – In C# this should already work).