Skip to Content
VB.NET Language in a Nutshell, Second Edition
book

VB.NET Language in a Nutshell, Second Edition

by Steven Roman PhD, Ron Petrusha, Paul Lomax
April 2002
Intermediate to advanced
688 pages
19h 51m
English
O'Reilly Media, Inc.
Content preview from VB.NET Language in a Nutshell, Second Edition

Name

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

VB .NET Language in a Nutshell

VB .NET Language in a Nutshell

Steven Roman PhD, Ron Petrusha, Paul Lomax

Publisher Resources

ISBN: 0596003080Supplemental ContentCatalog PageErrata