all groups > dotnet windows forms > january 2008 >
You're in the

dotnet windows forms

group:

How can I pass a parameter to a new thread?



How can I pass a parameter to a new thread? rkbnair
1/29/2008 1:46:01 PM
dotnet windows forms: How can I pass a parameter to a new thread?

Thread t = new Thread(new ThreadStart(ThreadProc));
t.Start();
Thread.Sleep(0);
Re: How can I pass a parameter to a new thread? Jon Skeet [C# MVP]
1/29/2008 9:59:42 PM
[quoted text, click to view]

See http://pobox.com/~skeet/csharp/threads/parameters.shtml

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
Re: How can I pass a parameter to a new thread? Herfried K. Wagner [MVP]
1/29/2008 10:50:29 PM
"rkbnair" <rkbnair@community.nospam> schrieb:
[quoted text, click to view]

Take a look at 'ParameterizedThreadStart' (since .NET 2.0).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
AddThis Social Bookmark Button