ApartmentState (System.Threading.ApartmentState)

Inherits: System.Enum

Interfaces: IComparable, IFormattable, IConvertible

Derived Types: 0

Assembly: mscorlib.dll

Specifies the apartment state of a Thread.

VB.NET C#

C#

public enum struct ApartmentState : System.IComparable, System.IFormattable, System.IConvertible
{
}

Articles

Documents

... Access Denied " errors; I get the following error in my .NET application " Must be in a multithreaded apartment. Apply MTAThread attribute or set System.Threading.ApartmentState to MTA

How To Set the COM Apartment Type in Managed Threads

2. Set Thread.ApartmentState to System.Threading.ApartmentState.STA . This causes the thread to enter an STA. If you set Thread.ApartmentState to System.Threading.ApartmentState.MTA ...

Long Pointers » 2006 » March

System.Threading.Thread.CurrentThread.ApartmentState = System.Threading.ApartmentState.STA; You can also specify it when you create a thread by doing this:

Mono Documentation

Mono Class Library : System.Threading Namespace System.Threading.ApartmentState Enumeration ... Remarks Documentation for this section has not yet been entered. Members

MBR IT/.NET 247 : System.Threading.ApartmentState Enumeration ...

Basic Instincts: MSDN: Creating and Managing Secondary Threads: HOW TO: Recursively Search Folders by Using Visual C++ .NET: http://www.kbalertz.com/ (307009) - This step-by-step ...

Rob Blackwell » 2006» November

... lsharp\\lsharp.org\\download\\calc.xaml"))) ;; Run the application with the new window (run app win)) ;; WPF Requires [STAThread] (spawn (main) (sta system.threading.apartmentstate)

Rob Blackwell » Blog Archive » LSharp and Windows Presentation ...

sta system.threading.apartmentstate)) This entry was posted on Thursday, November 16th, 2006 at 8:55 pm and is filed under L Sharp

.NET

int main() { System::Threading::Thread::CurrentThread->ApartmentState = System::Threading::ApartmentState::STA; Application::Run(new EditIt()); return 0;

.NET

System::Threading::Thread::CurrentThread->ApartmentState = System::Threading::ApartmentState::STA; . The .Net framework requires all applications to specify the thread model employed

Custom .NET Training ASP.NET Training Silverlight Training LINQ Training IT Support