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)

[AttributeUsageAttribute(AttributeTargets::Method)] 
[ComVisibleAttribute(true)] 
public ref class LoaderOptimizationAttribute sealed : public Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Method) */ 
/** @attribute ComVisibleAttribute(true) */ 
public final class LoaderOptimizationAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Method) 
ComVisibleAttribute(true) 
public final class LoaderOptimizationAttribute extends Attribute

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 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft