O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

MTAThreadAttribute

Synopsis

This attribute is used entirely for COM interoperability in .NET; it has no effect on a pure .NET application or system.

This attribute can only be used on the Main method of the application. It sets the default threading model to MTA (multithreaded apartment). Alternatively, you can use the STAThreadAttribute attribute for a single-threaded apartment model.

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

Hierarchy

ObjectAttributeMTAThreadAttribute

Valid On

Method

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required