quote:Originally posted by ShawnZ
Does [STAThread] need {...}?
I don't think it does.
quote:Originally posted by http://www.csharp-station.com/Tutorials/Lesson16.aspx
Listing 16-1 also contains another attribute you're likely to see, the STAThreadAttribute attribute. You'll often see this attribute applied to the Main() method, indicating that this C# program should communicate with unmanaged COM code using the Single Threading Apartment . It is generally safe to use this attribute all the time because you never know when a 3rd party library you're using is going to be communicating with COM. The following excerpt shows how to use the STAThreadAttribute attribute:
[STAThread]
static void Main(string[] args)
...
This post was edited on 11-14-2005 at 04:36 AM by Weyzza.