MTAThread Attribute

   
MTAThread Attribute

Class

System.MTAThreadAttribute

Applies to

Method

Description

Specifies that the class or application to which the program element belongs is to use the multithreaded apartment model for COM interop. If COM components are not called from the class or application, the attribute has no effect. The <MTAThread> attribute should be used only on the class or application's Main method or subroutine.

The <MTAThread> attribute is similar to setting a Thread object's ApartmentState property to ApartmentState.MTA . The difference is that the <MTAThread> attribute creates a multithreaded apartment from startup, whereas setting the property does it only from the point that the property is set.

Constructor

 New(  ) 

Properties

None

   


VB.Net Language in a Nutshell
VB.NET Language in a Nutshell
ISBN: B00006L54Q
EAN: N/A
Year: 2002
Pages: 503

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net