C Board  

Go Back   C Board > General Programming Boards > C# Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 04-11-2005, 02:59 PM   #1
Seeking motivation...
 
endo's Avatar
 
Join Date: May 2002
Posts: 537
[STAThread]

What does [STAThread] do above main( ) in C#? I found it hard to understand the stuff found on google but it seems to be something that applies itself to main( ) and is to do with threading??

Is it an attribute? I've just started c# and keep seeing them mentioned but haven't got to that bit yet!
__________________
Couldn't think of anything interesting, cool or funny - sorry.
endo is offline   Reply With Quote
Old 04-11-2005, 07:02 PM   #2
Yes, my avatar is stolen
 
anonytmouse's Avatar
 
Join Date: Dec 2002
Posts: 2,544
STAThread stands for "Single Thread Apartment Thread". This relates to the COM threading model. You can search for "Single Thread Apartment" for more information. STA is the default and fine for nearly all tasks so you can ignore it for now.
anonytmouse is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump


All times are GMT -6. The time now is 03:59 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22