[STAThread]
-
What does [STAThread] mean? I've seen it in examples, and I was wondering what it was.
----- *** Never give me an answer having anything to do with Visual Studio. I don't have this because I have two computers, one being my dad's mac, which is connected to the internet, the other being my pc, which is, sadly, not connected to the internet. The setup for the Visual C# program I think is called a "bootstrap" program, and it needs to connect to the internet to install the program. THEREFORE I cannot install this program onto my pc.***
-
What does [STAThread] mean? I've seen it in examples, and I was wondering what it was.
----- *** Never give me an answer having anything to do with Visual Studio. I don't have this because I have two computers, one being my dad's mac, which is connected to the internet, the other being my pc, which is, sadly, not connected to the internet. The setup for the Visual C# program I think is called a "bootstrap" program, and it needs to connect to the internet to install the program. THEREFORE I cannot install this program onto my pc.***
Windows has a notion of "Appartments"; STA stands for Single Threaded Appartment, MTA for Multi Threaded Appartment. It is a complex matter. IIRC in general MTA will allow for more concurrency between threads (and more concurrency problems), whereas STA enforces several things to happen sequentially, such as several threads accessing the same COM object. Either read up on "Appartment model", or wait for it to become really relevant to you, then study it in detail... :)
Luc Pattyn
try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }