Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 07-17-2009, 02:32 PM   #1
Baseband Member
 
Join Date: Nov 2008
Posts: 91
Default creating threads in C#

Can someone please break down a simple statement for a relative newbie?

Code:
Thread firstThread = new Thread (new ThreadStart (Method1));
In other words, what is happening at each stage here:

Code:
new ThreadStart (Method1)
Code:
new Thread (new ThreadStart (Method1))
Code:
Thread firstThread = new Thread (new ThreadStart (Method1));
Thanks for any help you can give.
__________________

BobLewiston is offline   Reply With Quote
Old 07-17-2009, 02:45 PM   #2
In Runtime
 
essentialx3's Avatar
 
Join Date: Jul 2009
Posts: 243
Send a message via AIM to essentialx3
Default Re: creating threads in C#

Code:
new ThreadStart (Method1)
a new instance of ThreadStart, with Method1 being passed to it

Code:
new Thread (new ThreadStart (Method1))
a new thread with what I said before being passed to it

Code:
Thread firstThread = new Thread (new ThreadStart (Method1));
a new instance of a thread called first thread, with what I said before being passed to it
__________________

__________________
-Zack
essentialx3 is offline   Reply With Quote
Old 07-24-2009, 03:42 PM   #3
Baseband Member
 
Join Date: Nov 2008
Posts: 91
Default Re: creating threads in C#

I'd be glad to, but I don't see any picture of a double scale, on the side or anywhere else. But thanks.
BobLewiston is offline   Reply With Quote
Old 07-24-2009, 04:00 PM   #4
In Runtime
 
essentialx3's Avatar
 
Join Date: Jul 2009
Posts: 243
Send a message via AIM to essentialx3
Default Re: creating threads in C#

it's ok. you need 100 posts. but thank you anyway!!!
and im glad i could help
__________________
-Zack
essentialx3 is offline   Reply With Quote
Reply

« Web Browser | .net »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 12:22 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0