• Coding
  • [VB.NET] Passing multiple parameters to a thread.

Hi Geeks,
i am trying to run a subroutine through a thread.

the sub is like that:
private sub dochat(byval cnx as socket,byval sname as string)
the simplest way is to pass one parameter when starting the thread >>
 thread1.start(parameter)
but what if i want to pass more than one parameter ??

Please i want the simplest way.
is it too hard that much ??
I think this is what you are looking for:
' create the thread using a dochat delegate
Dim t As Thread = New Thread(AddressOf dochat)
t.start();
Reference: http://www.devx.com/dotnet/Article/11358