Re: passing parameter to thread ??
From: Richard Blewett [DevelopMentor] (richardb_at_develop.com)
Date: 09/27/04
- Next message: Lasse Edsvik: "Internal class?"
- Previous message: cmrchs_at_yahoo.com: "passing parameter to thread ??"
- In reply to: cmrchs_at_yahoo.com: "passing parameter to thread ??"
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: passing parameter to thread ??"
- Reply: Nicholas Paldino [.NET/C# MVP]: "Re: passing parameter to thread ??"
- Messages sorted by: [ date ] [ thread ]
To: microsoft.public.dotnet.languages.csharp Date: Mon, 27 Sep 2004 04:47:37 -0700
Diving in before Jon does ;-)
http://www.yoda.arachsys.com/csharp/threadstart.html
Regards
Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog
Hi,
Is there a way to pass a parameter to a thread ?
Creating a thread is done using a ThreadStart-delegate object
example :
Thread thread1 = new Thread(new ThreadStart(MyFunction))
Unfortunately, it doesn't allow me to pass arguments to MyFunction since the definition of the ThreadStart is :
public delegate void ThreadStart();
Is there a way, anyhow, to pass a parameter to a thread ?
Using some other mechanism ?
thnx
Christian
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.768 / Virus Database: 515 - Release Date: 22/09/2004
[microsoft.public.dotnet.languages.csharp]
- Next message: Lasse Edsvik: "Internal class?"
- Previous message: cmrchs_at_yahoo.com: "passing parameter to thread ??"
- In reply to: cmrchs_at_yahoo.com: "passing parameter to thread ??"
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: passing parameter to thread ??"
- Reply: Nicholas Paldino [.NET/C# MVP]: "Re: passing parameter to thread ??"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|