Thread
Threadwithparam =New Thread(New Parameterizedthreadstart(New ThreadTest(). showmsg));//threadwithparam.start ("This is a param.");
Threadwithparam.start (
Thread. Start ();
"44444");Threadthread=New Thread(New ThreadStart(New CLASS11(). showmsg));
Delegate method that represents the method executed on Thread, ThreadStart cannot take parameters, Parameterizedthreadstart is new in 2.0, can take parameters (type of object)
Using System.Threading;
public void ShowMsg ()
{
MessageBox.Show ("Message Info.");
}
Thread thread = new Thread (new ThreadStart (showmsg));
Thread. Start ();
With parameters
public void ShowMsg (Object msg)
{
MessageBox.Show (Msg. ToString ());
}
Thread Threadwithparam = new Thread (new Parameterizedthreadstart (New ThreadTest (). SHOWMSG));
Threadwithparam.start ("This is a param.");
Use of Parameterizedthreadstart,threadstart, threads thread Pass parameters