Name

STAThreadAttribute

Synopsis

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.

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

Public NotInheritable Class STAThreadAttribute : Inherits Attribute
' Public Constructors
   Public Sub New() 
End Class

Hierarchy

ObjectAttribute STAThreadAttribute

Valid On

Method

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.