Export (0) Print
Expand All

LoaderOptimizationAttribute Class

Used to set the default loader optimization policy for the main method of an executable application.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

'Declaration
<AttributeUsageAttribute(AttributeTargets.Method)> _
<ComVisibleAttribute(True)> _
Public NotInheritable Class LoaderOptimizationAttribute
	Inherits Attribute
'Usage
Dim instance As LoaderOptimizationAttribute

/** @attribute AttributeUsageAttribute(AttributeTargets.Method) */ 
/** @attribute ComVisibleAttribute(true) */ 
public final class LoaderOptimizationAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Method) 
ComVisibleAttribute(true) 
public final class LoaderOptimizationAttribute extends Attribute
Not applicable.

The LoaderOptimizationAttribute can only be set on the main method for an executable application and is ignored on all other methods.

The LoaderOptimizationAttribute attribute is specified with a LoaderOptimization enumeration value, which tells the loader what type of application to optimize for: SingleDomain, MultiDomain, or MultiDomainHost.

This attribute is only a hint to the loader and does not affect program behavior.

NoteNote:

If custom code access security policy is set for the AppDomain, by using the SetAppDomainPolicy property, and the AppDomain is created using the MultiDomain flag, the effect is the same as specifying the MultiDomainHost flag; that is, only assemblies in the GAC are shared. When this occurs, the loader does not throw an exception and the application does not experience the performance gains associated with the MultiDomain flag.

System.Object
   System.Attribute
    System.LoaderOptimizationAttribute

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft