STAThreadAttribute

STAThreadAttribute

System (mscorlib.dll)sealed class

This attribute can be used only on the Main method of an application. It sets the default threading model to STA (single-threaded apartment). Alternatively, you can use the MTAThreadAttribute attribute to use a multithreaded apartment model. See Chapter 17.

Like its counterpart, MTAThreadAttribute, this attribute has no meaning outside of COM interoperability.

public sealed class STAThreadAttribute : Attribute {
// Public Constructors
   public STAThreadAttribute( );
}

Hierarchy

Object Attribute STAThreadAttribute

Valid On

Method



    Part II: Programming with the .NET Framework
    Part IV: API Quick Reference
    Chapter 26. System