asp.net.ph

STAThreadAttribute Class

System Namespace


Indicates that the default threading model for an application is single-threaded apartment ( STA ).

STAThreadAttribute Class Members

Collapse   Constructors

Visibility Constructor Parameters
public STAThreadAttribute ( )

Remarks

Threading models only pertain to applications that use COM interop. Applying this attribute to an application that does not use COM interop has no effect.

The startup threading model can be set to single-threaded apartment or multithreaded apartment. If it is not set, then the thread is not initialized.

This attribute has the same effect as setting in the System.Threading.ApartmentState property of a System.Threading.Thread. Apply this attribute, rather than set the ApartmentState property, to ensure the threading model is set before any startup code is executed.

Apply this attribute to the main method of an application.

See Also

MTAThreadAttribute Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph