RuntimeInfrastructure mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.MarshalByRefObject System._AppDomain System.Security.IEvidenceFactory System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None) System.Runtime.InteropServices.ComDefaultInterface(typeof(System._AppDomain)) System.Runtime.InteropServices.ComVisible(true)

Application domains, which are represented by objects, help provide isolation, unloading, and security boundaries for executing managed code.

Use application domains to isolate tasks that might bring down a process. If the state of the that's executing a task becomes unstable, the can be unloaded without affecting the process. This is important when a process must run for long periods without restarting. You can also use application domains to isolate tasks that should not share data.

If an assembly is loaded into the default application domain, it cannot be unloaded from memory while the process is running. However, if you open a second application domain to load and execute the assembly, the assembly is unloaded when that application domain is unloaded. Use this technique to minimize the working set of long-running processes that occasionally use large DLLs.

Multiple application domains can run in a single process; however, there is not a one-to-one correlation between application domains and threads. Several threads can belong to a single application domain, and while a given thread is not confined to a single application domain, at any given time, a thread executes in a single application domain.

Application domains are created using the method. instances are used to load and execute assemblies (). When an is no longer in use, it can be unloaded.

The class implements a set of events that enable applications to respond when an assembly is loaded, when an application domain will be unloaded, or when an unhandled exception is thrown.

For more information on using application domains, see Application Domains.

This class implements the , , and interfaces.

You should never create a remotable wrapper for an object. Doing so could publish a remote reference to that , exposing methods such as to remote access and effectively destroying code access security for that . Malicious clients connecting to the remoted could obtain access to any resource the itself has access to. Do not create remotable wrappers for any type that extends and that implements methods that could be used by malicious clients to bypass the security system.

The default value for the property is false. This setting is unsafe for services. To prevent services from downloading partially trusted code, set this property to true.

Represents an application domain, which is an isolated environment where applications execute. This class cannot be inherited.

- Property
  2.0.0.0
  4.0.0.0
  System.ActivationContext To be added. To be added.

  Gets the activation context for the current application domain.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("AppDomain.AppendPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead.")
  System.Void ``

  The use of this property is not recommended, because it might change the probing path for assemblies after they have already been loaded. Use the property instead.

  The private path, or relative search path, is the path relative to the base directory where the assembly resolver probes for private assemblies.

  Appends the specified directory name to the private path list.

  The name of the directory to be appended to the private path.
- Property
  2.0.0.0
  4.0.0.0
  System.ApplicationIdentity To be added. To be added.

  Gets the identity of the application in the application domain.

- Property
  2.0.0.0
  4.0.0.0
  System.Security.Policy.ApplicationTrust To be added. To be added.

  Gets information describing permissions granted to an application and whether the application has a trust level that allows it to run.

- Method
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.String ``

  The method takes an assembly display name and returns the post-policy display name. This is useful if you need to load an assembly using policy, because the reflection-only context does not apply policy.

  Returns the assembly display name after policy has been applied.

  A string containing the assembly display name after policy has been applied.

  The assembly display name, in the form provided by the property.
- Event
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.AssemblyLoadEventHandler

  The delegate for this event indicates what assembly was loaded.

  To register an event handler for this event, you must have the required permissions, or a is thrown.

  For more information about handling events, see Events Overview.

  Occurs when an assembly is loaded.

  0
- Event
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.ResolveEventHandler

  It is the responsibility of the for this event to return the assembly that is specified by the property, or to return null if the assembly is not recognized. The assembly must be loaded into an execution context; if it is loaded into the reflection-only context, the load that caused this event to be raised fails.

  For guidance on the use of this event, see Resolving Assembly Loads.

  Beginning with the net_v40_long, the property returns the assembly that requested the assembly load that could not be resolved. For example, the loader might be unable to load a dependency of the requesting assembly because the requesting assembly and its dependency are not in the probing path. Knowing the identity of the requesting assembly might be useful in locating the dependency or in identifying the correct version, if more than one version of the dependency is available. For more information, see .

  Beginning with the net_v40_short, the event is raised for all assemblies, including resource assemblies. In earlier versions, the event was not raised for resource assemblies. If the operating system is localized, the handler might be called multiple times: once for each culture in the fallback chain.

  For this event, the property returns the assembly name before policy is applied.

  If more than one event handler is registered for this event, the event handlers are called in order until an event handler returns a value that isn't null. Subsequent event handlers are ignored.

  For more information about handling events, see Events Overview.

  Occurs when the resolution of an assembly fails.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String To be added.

  This property corresponds to the property. It can also be retrieved using the method with the string "APPBASE".

  Gets the base directory that the assembly resolver uses to probe for assemblies.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("AppDomain.ClearPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead.")
  System.Void

  The private path is a path relative to the base directory that the common language runtime searches to locate private assemblies.

  For more information, see .

  Resets the path that specifies the location of private assemblies to the empty string ("").

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use AppDomainSetup.ShadowCopyDirectories")
  System.Void

  The shadow copy path is a list of directories where shadow copied assemblies are stored.

  For more information, see and Shadow Copying Assemblies.

  Resets the list of directories containing shadow copied assemblies to the empty string ("").

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Remoting.ObjectHandle `` ``

  Use this method to create objects remotely without having to load the type locally.

  The return value must to be unwrapped to access the real object.

  A attribute with a value of true must be applied either explicitly or by default to the COM type for this method to create an instance of that type; otherwise, is thrown.

  Creates a new instance of a specified COM type. Parameters specify the name of a file that contains an assembly containing the type and the name of the type.

  An object that is a wrapper for the new instance specified by . The return value needs to be unwrapped to access the real object.

  The name of a file containing an assembly that defines the requested type. The name of the requested type.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Remoting.ObjectHandle `` `` `` ``

  Use this method to create objects remotely without having to load the type locally.

  The return value must to be unwrapped to access the real object.

  A attribute with a value of true must be applied either explicitly or by default to the COM type for this method to create an instance of that type; otherwise, is thrown.

  Creates a new instance of a specified COM type. Parameters specify the name of a file that contains an assembly containing the type and the name of the type.

  An object that is a wrapper for the new instance specified by . The return value needs to be unwrapped to access the real object.

  The name of a file containing an assembly that defines the requested type. The name of the requested type. Represents the value of the computed hash code. Represents the hash algorithm used by the assembly manifest.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.AppDomain `` is .

  The parameter is intended to identify the domain in a manner that is meaningful to humans. This string should be suitable for display in user interfaces.

  This method overload uses the information from the default application domain.

  Creates a new application domain with the specified name.

  The newly created application domain.

  The friendly name of the domain. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.AppDomain `` ``

  This method overload uses the information from the default application domain.

  If is not supplied, the evidence from the current application domain is used.

  Do not use this method overload to create sandboxed application domains. Beginning with the net_v40_long, the evidence that is supplied for no longer affects the grant set of the application domain. Use the method overload to create sandboxed application domains.

  Creates a new application domain with the given name using the supplied evidence.

  The newly created application domain.

  The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see . Evidence that establishes the identity of the code that runs in the application domain. Pass null to use the evidence of the current application domain.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.AppDomain `` `` ``

  If is not supplied, this method overload uses the information from the default application domain.

  If is not supplied, the evidence from the current application domain is used.

  Do not use this method overload to create sandboxed application domains. Beginning with the net_v40_long, the evidence that is supplied for no longer affects the grant set of the application domain. Use the method overload to create sandboxed application domains.

  Creates a new application domain using the specified name, evidence, and application domain setup information.

  The newly created application domain.

  The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see . Evidence that establishes the identity of the code that runs in the application domain. Pass null to use the evidence of the current application domain. An object that contains application domain initialization information.
- Method
  2.0.0.0
  4.0.0.0
  System.AppDomain `` `` `` `` `System.ParamArray`

  You must set the property of the object that you supply for . Otherwise, an exception is thrown.

  If is not supplied, the evidence from the current application domain is used.

  The information provided for and is used to create an object for the new application domain.

  Creates a new application domain using the specified name, evidence, application domain setup information, default permission set, and array of fully trusted assemblies.

  The newly created application domain.

  The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see the description of . Evidence that establishes the identity of the code that runs in the application domain. Pass null to use the evidence of the current application domain. An object that contains application domain initialization information. A default permission set that is granted to all assemblies loaded into the new application domain that do not have specific grants. An array of strong names representing assemblies to be considered fully trusted in the new application domain.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.AppDomain `` `` `` `` ``

  If is not supplied, the evidence from the current application domain is used.

  For more information about shadow copying, see and Shadow Copying Assemblies.

  Do not use this method overload to create sandboxed application domains. Beginning with the net_v40_long, the evidence that is supplied for no longer affects the grant set of the application domain. Use the method overload to create sandboxed application domains.

  Creates a new application domain with the given name, using evidence, application base path, relative search path, and a parameter that specifies whether a shadow copy of an assembly is to be loaded into the application domain.

  The newly created application domain.

  The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see . Evidence that establishes the identity of the code that runs in the application domain. Pass null to use the evidence of the current application domain. The base directory that the assembly resolver uses to probe for assemblies. For more information, see . The path relative to the base directory where the assembly resolver should probe for private assemblies. For more information, see . If true, a shadow copy of an assembly is loaded into this application domain.
- Method
  2.0.0.0
  4.0.0.0
  System.AppDomain `` `` `` `` `` `` ``

  The method represented by is executed in the context of the newly created application domain.

  If is not supplied, the evidence from the current application domain is used.

  For more information about shadow copying, see and Shadow Copying Assemblies.

  Do not use this method overload to create sandboxed application domains. Beginning with the net_v40_long, the evidence that is supplied for no longer affects the grant set of the application domain. Use the method overload to create sandboxed application domains.

  Creates a new application domain with the given name, using evidence, application base path, relative search path, and a parameter that specifies whether a shadow copy of an assembly is to be loaded into the application domain. Specifies a callback method that is invoked when the application domain is initialized, and an array of string arguments to pass the callback method.

  The newly created application domain.

  The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see . Evidence that establishes the identity of the code that runs in the application domain. Pass null to use the evidence of the current application domain. The base directory that the assembly resolver uses to probe for assemblies. For more information, see . The path relative to the base directory where the assembly resolver should probe for private assemblies. For more information, see . true to load a shadow copy of an assembly into the application domain. An delegate that represents a callback method to invoke when the new object is initialized. An array of string arguments to be passed to the callback represented by , when the new object is initialized.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Remoting.ObjectHandle `` ``

  This method calls the default constructor for .

  See for the format of .

  An attempt to call on a target application domain that is not the current application domain will result in a successful load of the assembly in the target application domain. Since an is not , when this method attempts to return the for the loaded assembly to the current application domain, the common language runtime will try to load the assembly into the current application domain and the load might fail. The assembly that is loaded into the current application domain might be different from the assembly that was loaded first if the path settings for the two application domains are different.

  Creates a new instance of the specified type defined in the specified assembly.

  An object that is a wrapper for the new instance specified by . The return value needs to be unwrapped to access the real object.

  The display name of the assembly. See . The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Remoting.ObjectHandle `` `` ``

  This method calls the default constructor for .

  See for the format of .

  The parameter is related to client-activated objects; see Client Activation.

  An attempt to call on a target application domain that is not the current application domain will result in a successful load of the assembly in the target application domain. Since an is not , when this method attempts to return the for the loaded assembly to the current application domain, the common language runtime will try to load the assembly into the current application domain and the load might fail. The assembly that is loaded into the current application domain might be different from the assembly that was loaded first if the path settings for the two application domains are different.

  Creates a new instance of the specified type defined in the specified assembly. A parameter specifies an array of activation attributes.

  An object that is a wrapper for the new instance specified by . The return value needs to be unwrapped to access the real object.

  The display name of the assembly. See . The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object.
- Method
  4.0.0.0
  System.Runtime.Remoting.ObjectHandle `` `` `` `` `` `` `` ``

  See for the format of .

  The parameter is related to client-activated objects; see Client Activation.

  An attempt to call on a target application domain that is not the current application domain will result in a successful load of the assembly in the target application domain. Since an is not , when this method attempts to return the for the loaded assembly to the current application domain, the common language runtime will try to load the assembly into the current application domain and the load might fail. The assembly that is loaded into the current application domain might be different from the assembly that was loaded first if the path settings for the two application domains are different.

  Creates a new instance of the specified type defined in the specified assembly. Parameters specify a binder, binding flags, constructor arguments, culture-specific information used to interpret arguments, and optional activation attributes.

  An object that is a wrapper for the new instance specified by . The return value needs to be unwrapped to access the real object.

  The display name of the assembly. See . The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. A Boolean value specifying whether to perform a case-sensitive search or not. A combination of zero or more bit flags that affect the search for the constructor. If is zero, a case-sensitive search for public constructors is conducted. An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects using reflection. If is null, the default binder is used. The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the default constructor is preferred, must be an empty array or null. Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is null, the for the current thread is used. An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use an overload that does not take an Evidence parameter")
  System.Runtime.Remoting.ObjectHandle `` `` `` `` `` `` `` `` ``

  See for the format of .

  The parameter is related to client-activated objects; see Client Activation.

  An attempt to call on a target application domain that is not the current application domain will result in a successful load of the assembly in the target application domain. Since an is not , when this method attempts to return the for the loaded assembly to the current application domain, the common language runtime will try to load the assembly into the current application domain and the load might fail. The assembly that is loaded into the current application domain might be different from the assembly that was loaded first if the path settings for the two application domains are different.

  Creates a new instance of the specified type defined in the specified assembly. Parameters specify a binder, binding flags, constructor arguments, culture-specific information used to interpret arguments, activation attributes, and authorization to create the type.

  An object that is a wrapper for the new instance specified by . The return value needs to be unwrapped to access the real object.

  The display name of the assembly. See . The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. A Boolean value specifying whether to perform a case-sensitive search or not. A combination of zero or more bit flags that affect the search for the constructor. If is zero, a case-sensitive search for public constructors is conducted. An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects using reflection. If is null, the default binder is used. The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the default constructor is preferred, must be an empty array or null. Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is null, the for the current thread is used. An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object. Information used to authorize creation of .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object `` ``

  This is a convenience method that combines and . This method calls the default constructor for .

  See for the format of . See the property for the format of .

  If you make an early-bound call to a method M of an object of type T1 that was returned by , and that method makes an early-bound call to a method of an object of type T2 in an assembly C other than the current assembly or the assembly containing T1, assembly C is loaded into the current application domain. This loading occurs even if the early-bound call to T1.M() was made in the body of a , or in other dynamically generated code. If the current domain is the default domain, assembly C cannot be unloaded until the process ends. If the current domain later attempts to load assembly C, the load might fail.

  Creates a new instance of the specified type. Parameters specify the assembly where the type is defined, and the name of the type.

  An instance of the object specified by .

  The display name of the assembly. See . The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object `` `` ``

  This is a convenience method that combines and . This method calls the default constructor for .

  See for the format of . See the property for the format of .

  The parameter is related to client-activated objects; see Client Activation.

  If you make an early-bound call to a method M of an object of type T1 that was returned by , and that method makes an early-bound call to a method of an object of type T2 in an assembly C other than the current assembly or the assembly containing T1, assembly C is loaded into the current application domain. This loading occurs even if the early-bound call to T1.M() was made in the body of a , or in other dynamically generated code. If the current domain is the default domain, assembly C cannot be unloaded until the process ends. If the current domain later attempts to load assembly C, the load might fail.

  Creates a new instance of the specified type. Parameters specify the assembly where the type is defined, the name of the type, and an array of activation attributes.

  An instance of the object specified by .

  The display name of the assembly. See . The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object.
- Method
  4.0.0.0
  System.Object `` `` `` `` `` `` `` ``

  This is a convenience method that combines and .

  See for the format of . See the property for the format of .

  The parameter is related to client-activated objects; see Client Activation.

  If you make an early-bound call to a method M of an object of type T1 that was returned by , and that method makes an early-bound call to a method of an object of type T2 in an assembly C other than the current assembly or the assembly containing T1, assembly C is loaded into the current application domain. This loading occurs even if the early-bound call to T1.M() was made in the body of a , or in other dynamically generated code. If the current domain is the default domain, assembly C cannot be unloaded until the process ends. If the current domain later attempts to load assembly C, the load might fail.

  Creates a new instance of the specified type defined in the specified assembly, specifying whether the case of the type name is ignored; the binding attributes and the binder that are used to select the type to be created; the arguments of the constructor; the culture; and the activation attributes.

  An instance of the object specified by .

  The display name of the assembly. See . The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. A Boolean value specifying whether to perform a case-sensitive search or not. A combination of zero or more bit flags that affect the search for the constructor. If is zero, a case-sensitive search for public constructors is conducted. An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects using reflection. If is null, the default binder is used. The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the default constructor is preferred, must be an empty array or null. A culture-specific object used to govern the coercion of types. If is null, the CultureInfo for the current thread is used. An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use an overload that does not take an Evidence parameter")
  System.Object `` `` `` `` `` `` `` `` ``

  This is a convenience method that combines and .

  See for the format of . See the property for the format of .

  The parameter is related to client-activated objects; see Client Activation.

  If you make an early-bound call to a method M of an object of type T1 that was returned by , and that method makes an early-bound call to a method of an object of type T2 in an assembly C other than the current assembly or the assembly containing T1, assembly C is loaded into the current application domain. This loading occurs even if the early-bound call to T1.M() was made in the body of a , or in other dynamically generated code. If the current domain is the default domain, assembly C cannot be unloaded until the process ends. If the current domain later attempts to load assembly C, the load might fail.

  Creates a new instance of the specified type. Parameters specify the name of the type, and how it is found and created.

  An instance of the object specified by .

  The display name of the assembly. See . The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. A Boolean value specifying whether to perform a case-sensitive search or not. A combination of zero or more bit flags that affect the search for the constructor. If is zero, a case-sensitive search for public constructors is conducted. An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects using reflection. If is null, the default binder is used. The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the default constructor is preferred, must be an empty array or null. A culture-specific object used to govern the coercion of types. If is null, the CultureInfo for the current thread is used. An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object. Information used to authorize creation of .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Remoting.ObjectHandle `` ``

  The default constructor for is invoked.

  For more information, see the method.

  When the method is used to create an instance in a target application domain, other than the application domain from which the call is made, the assembly is loaded in the target application domain. However, if the instance is unwrapped in the calling application domain, using the unwrapped instance in certain ways can cause the assembly to be loaded into the calling application domain. For example, after the instance is unwrapped, its type information might be requested, in order to call its methods late-bound. When the assembly is loaded into the calling application domain, exceptions can occur.

  If another version of the same assembly was previously loaded into the calling application domain, or if the load path of the calling application domain is different from that of the target application domain, exceptions such as can occur.

  If the calling application domain makes early-bound calls to the instance type, can be thrown when an attempt is made to cast the instance.

  Creates a new instance of the specified type defined in the specified assembly file.

  An object that is a wrapper for the new instance, or null if is not found. The return value needs to be unwrapped to access the real object.

  The name, including the path, of a file that contains an assembly that defines the requested type. The assembly is loaded using the method. The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Remoting.ObjectHandle `` `` ``

  The default constructor for is invoked.

  The parameter is related to client-activated objects; see Client Activation.

  For more information about this method, see the method.

  When the method is used to create an instance in a target application domain, other than the application domain from which the call is made, the assembly is loaded in the target application domain. However, if the instance is unwrapped in the calling application domain, using the unwrapped instance in certain ways can cause the assembly to be loaded into the calling application domain. For example, after the instance is unwrapped, its type information might be requested, in order to call its methods late-bound. When the assembly is loaded into the calling application domain, exceptions can occur.

  If another version of the same assembly was previously loaded into the calling application domain, or if the load path of the calling application domain is different from that of the target application domain, exceptions such as can occur.

  If the calling application domain makes early-bound calls to the instance type, can be thrown when an attempt is made to cast the instance.

  Creates a new instance of the specified type defined in the specified assembly file.

  An object that is a wrapper for the new instance, or null if is not found. The return value needs to be unwrapped to access the real object.

  The name, including the path, of a file that contains an assembly that defines the requested type. The assembly is loaded using the method. The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object.
- Method
  4.0.0.0
  System.Runtime.Remoting.ObjectHandle `` `` `` `` `` `` `` ``

  For more information, see the method.

  The parameter is related to client-activated objects; see Client Activation.

  When the method is used to create an instance in a target application domain, other than the application domain from which the call is made, the assembly is loaded in the target application domain. However, if the instance is unwrapped in the calling application domain, using the unwrapped instance in certain ways can cause the assembly to be loaded into the calling application domain. For example, after the instance is unwrapped, its type information might be requested, in order to call its methods late-bound. When the assembly is loaded into the calling application domain, exceptions can occur.

  If another version of the same assembly was previously loaded into the calling application domain, or if the load path of the calling application domain is different from that of the target application domain, exceptions such as can occur.

  If the calling application domain makes early-bound calls to the instance type, can be thrown when an attempt is made to cast the instance.

  Creates a new instance of the specified type defined in the specified assembly file.

  An object that is a wrapper for the new instance, or null if is not found. The return value needs to be unwrapped to access the real object.

  The name, including the path, of a file that contains an assembly that defines the requested type. The assembly is loaded using the method. The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. A Boolean value specifying whether to perform a case-sensitive search or not. A combination of zero or more bit flags that affect the search for the constructor. If is zero, a case-sensitive search for public constructors is conducted. An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects through reflection. If is null, the default binder is used. The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the default constructor is preferred, must be an empty array or null. Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is null, the for the current thread is used. An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use an overload that does not take an Evidence parameter")
  System.Runtime.Remoting.ObjectHandle `` `` `` `` `` `` `` `` ``

  For more information about this method, see the method.

  The parameter is related to client-activated objects; see Client Activation.

  When the method is used to create an instance in a target application domain, other than the application domain from which the call is made, the assembly is loaded in the target application domain. However, if the instance is unwrapped in the calling application domain, using the unwrapped instance in certain ways can cause the assembly to be loaded into the calling application domain. For example, after the instance is unwrapped, its type information might be requested, in order to call its methods late-bound. When the assembly is loaded into the calling application domain, exceptions can occur.

  If another version of the same assembly was previously loaded into the calling application domain, or if the load path of the calling application domain is different from that of the target application domain, exceptions such as can occur.

  If the calling application domain makes early-bound calls to the instance type, can be thrown when an attempt is made to cast the instance.

  Creates a new instance of the specified type defined in the specified assembly file.

  An object that is a wrapper for the new instance, or null if is not found. The return value needs to be unwrapped to access the real object.

  The name, including the path, of a file that contains an assembly that defines the requested type. The assembly is loaded using the method. The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. A Boolean value specifying whether to perform a case-sensitive search or not. A combination of zero or more bit flags that affect the search for the constructor. If is zero, a case-sensitive search for public constructors is conducted. An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects through reflection. If is null, the default binder is used. The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the default constructor is preferred, must be an empty array or null. Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is null, the for the current thread is used. An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object. Information used to authorize creation of .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object `` ``

  This is a convenience method that combines and . This method calls the default constructor for .

  For more information, see the method.

  Creates a new instance of the specified type defined in the specified assembly file.

  The requested object, or null if is not found.

  The file name and path of the assembly that defines the requested type. The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object `` `` ``

  This is a convenience method that combines and . This method calls the default constructor for .

  The parameter is related to client-activated objects; see Client Activation.

  For more information about this method, see the method.

  Creates a new instance of the specified type defined in the specified assembly file.

  The requested object, or null if is not found.

  The file name and path of the assembly that defines the requested type. The fully qualified name of the requested type, including the namespace but not the assembly (see the property). An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object.
- Method
  4.0.0.0
  System.Object `` `` `` `` `` `` `` ``

  This is a convenience method that combines and .

  The parameter is related to client-activated objects; see Client Activation.

  For more information about this method, see the method.

  Creates a new instance of the specified type defined in the specified assembly file, specifying whether the case of the type name is ignored; the binding attributes and the binder that are used to select the type to be created; the arguments of the constructor; the culture; and the activation attributes.

  The requested object, or null if is not found.

  The file name and path of the assembly that defines the requested type. The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. A Boolean value specifying whether to perform a case-sensitive search or not. A combination of zero or more bit flags that affect the search for the constructor. If is zero, a case-sensitive search for public constructors is conducted. An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects through reflection. If is null, the default binder is used. The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the default constructor is preferred, must be an empty array or null. Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is null, the for the current thread is used. An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use an overload that does not take an Evidence parameter")
  System.Object `` `` `` `` `` `` `` `` ``

  This is a convenience method that combines and .

  The parameter is related to client-activated objects; see Client Activation.

  For more information about this method, see the method.

  Creates a new instance of the specified type defined in the specified assembly file.

  The requested object, or null if is not found.

  The file name and path of the assembly that defines the requested type. The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property. A Boolean value specifying whether to perform a case-sensitive search or not. A combination of zero or more bit flags that affect the search for the constructor. If is zero, a case-sensitive search for public constructors is conducted. An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects through reflection. If is null, the default binder is used. The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the default constructor is preferred, must be an empty array or null. Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is null, the for the current thread is used. An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. The specifies the URL that is required to activate a remote object. Information used to authorize creation of .
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.AppDomain To be added. To be added.

  Gets the current application domain for the current .

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.AssemblyBuilder `` ``

  This method should only be used to define a dynamic assembly in the current application domain. For more information, see the method overload.

  During the development of code that emits dynamic assemblies, it is recommended that you use an overload of the method that specifies evidence and permissions, supply the evidence you want the dynamic assembly to have, and include in . Including in the parameter ensures that the MSIL is verified. A limitation of this technique is that it also causes to be thrown when used with code that demands full trust.

  Defines a dynamic assembly with the specified name and access mode.

  A dynamic assembly with the specified name and access mode.

  The unique identity of the dynamic assembly. The access mode for the dynamic assembly.
- Method
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.AssemblyBuilder `` `` ``

  Use this method overload to specify attributes that do not work correctly unless they are applied when a dynamic assembly is created. For example, security attributes such as and do not work correctly if they are added after a dynamic assembly has been created.

  This method should be used only to define a dynamic assembly in the current application domain. For more information about this restriction, see the method overload.

  This method overload is introduced in the net_v35_long.

  Defines a dynamic assembly with the specified name, access mode, and custom attributes.

  A dynamic assembly with the specified name and features.

  The unique identity of the dynamic assembly. The access mode for the dynamic assembly. An enumerable list of attributes to be applied to the assembly, or null if there are no attributes.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Declarative security for assembly level is no longer enforced")
  System.Reflection.Emit.AssemblyBuilder `` `` ``

  Only fully trusted callers can supply their when defining a dynamic . The runtime will map the through the security policy to determine the granted permissions. Partially trusted callers must supply a null . If is null, the runtime copies the permission sets, that is, the current grant and deny sets, from the caller's to the dynamic being defined and marks policy as resolved.

  If the dynamic is saved to disk, subsequent loads will get grants based on policies associated with the location where the was saved.

  This method should only be used to define a dynamic assembly in the current application domain. For more information, see the method overload.

  During the development of code that emits dynamic assemblies, it is recommended that you use an overload of the method that specifies evidence and permissions, supply the evidence you want the dynamic assembly to have, and include in . Including in the parameter ensures that the MSIL is verified. A limitation of this technique is that it also causes to be thrown when used with code that demands full trust.

  Defines a dynamic assembly using the specified name, access mode, and evidence.

  A dynamic assembly with the specified name and features.

  The unique identity of the dynamic assembly. The mode in which the dynamic assembly will be accessed. The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Emit.AssemblyBuilder `` `` ``

  This method should only be used to define a dynamic assembly in the current application domain. For more information, see the method overload.

  During the development of code that emits dynamic assemblies, it is recommended that you use an overload of the method that specifies evidence and permissions, supply the evidence you want the dynamic assembly to have, and include in . Including in the parameter ensures that the MSIL is verified. A limitation of this technique is that it also causes to be thrown when used with code that demands full trust.

  Defines a dynamic assembly using the specified name, access mode, and storage directory.

  A dynamic assembly with the specified name and features.

  The unique identity of the dynamic assembly. The mode in which the dynamic assembly will be accessed. The name of the directory where the assembly will be saved. If is null, the directory defaults to the current directory.
- Method
  4.0.0.0
  System.Reflection.Emit.AssemblyBuilder `` `` `` ``

  Use this method overload to specify attributes that do not work correctly unless they are applied when a dynamic assembly is created. For example, security attributes such as and do not work correctly if they are added after a dynamic assembly has been created.

  This method should be used only to define a dynamic assembly in the current application domain. For more information about this restriction, see the method overload.

  Defines a dynamic assembly with the specified name, access mode, and custom attributes, and using the specified source for its security context.

  A dynamic assembly with the specified name and features.

  The unique identity of the dynamic assembly. The access mode for the dynamic assembly. An enumerable list of attributes to be applied to the assembly, or null if there are no attributes. The source of the security context.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Declarative security for assembly level is no longer enforced")
  System.Reflection.Emit.AssemblyBuilder `` `` `` ``

  Only fully trusted callers can supply their when defining a dynamic . The runtime will map the through the security policy to determine the granted permissions. Partially trusted callers must supply a null . If is null, the runtime copies the permission sets, that is, the current grant and deny sets, from the caller's to the dynamic being defined and marks policy as resolved.

  If the dynamic is saved to disk, subsequent loads will get grants based on policies associated with the location where the was saved.

  This method should only be used to define a dynamic assembly in the current application domain. For more information, see the method overload.

  During the development of code that emits dynamic assemblies, it is recommended that you use an overload of the method that specifies evidence and permissions, supply the evidence you want the dynamic assembly to have, and include in . Including in the parameter ensures that the MSIL is verified. A limitation of this technique is that it also causes to be thrown when used with code that demands full trust.

  Defines a dynamic assembly using the specified name, access mode, storage directory, and evidence.

  A dynamic assembly with the specified name and features.

  The unique identity of the dynamic assembly. The mode in which the dynamic assembly will be accessed. The name of the directory where the assembly will be saved. If is null, the directory defaults to the current directory. The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Declarative security for assembly level is no longer enforced")
  System.Reflection.Emit.AssemblyBuilder `` `` `` `` ``

  The permission requests specified for , , and are not used unless the dynamic assembly has been saved and reloaded into memory. To specify permission requests for a transient assembly that is never saved to disk, use an overload of the method that specifies evidence as well as requested permissions, and supply an object.

  During the development of code that emits dynamic assemblies, it is recommended that you use an overload of the method that specifies evidence and permissions, supply the evidence you want the dynamic assembly to have, and include in . Including in the parameter ensures that the MSIL is verified. A limitation of this technique is that it also causes to be thrown when used with code that demands full trust.

  This method should only be used to define a dynamic assembly in the current application domain. For more information, see the method overload .

  In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a dynamic assembly by using the , , and parameters are stored in the old XML metadata format. See Emitting Declarative Security Attributes.

  Defines a dynamic assembly using the specified name, access mode, and permission requests.

  A dynamic assembly with the specified name and features.

  The unique identity of the dynamic assembly. The mode in which the dynamic assembly will be accessed. The required permissions request. The optional permissions request. The refused permissions request.
- Method
  4.0.0.0
  System.Reflection.Emit.AssemblyBuilder `` `` `` `` ``

  Use this method overload to specify attributes that do not work correctly unless they are applied when a dynamic assembly is created. For example, security attributes such as and do not work correctly if they are added after a dynamic assembly has been created.

  If is true, the following methods of the resulting will be synchronized: , , , , , and . If two of these methods are called on different threads, one will block until the other is completed.

  Defines a dynamic assembly using the specified name, access mode, storage directory, and synchronization option.

  A dynamic assembly with the specified name and features.

  The unique identity of the dynamic assembly. The mode in which the dynamic assembly will be accessed. The name of the directory where the dynamic assembly will be saved. If is null, the current directory is used. true to synchronize the creation of modules, types, and members in the dynamic assembly; otherwise, false. An enumerable list of attributes to be applied to the assembly, or null if there are no attributes.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Declarative security for assembly level is no longer enforced")
  System.Reflection.Emit.AssemblyBuilder `` `` `` `` `` ``

  The permission requests specified for , , and are used only if is also supplied, or if the dynamic assembly is saved and reloaded into memory.

  During the development of code that emits dynamic assemblies, it is recommended that you include in . Including in the parameter ensures that the MSIL is verified. A limitation of this technique is that it also causes to be thrown when used with code that demands full trust.

  Only fully trusted callers can supply their when defining a dynamic . The runtime will map the through the security policy to determine the granted permissions. Partially trusted callers must supply a null . If is null, the runtime copies the permission sets, that is, the current grant and deny sets, from the caller's to the dynamic being defined and marks policy as resolved.

  If the dynamic is saved to disk, subsequent loads will get grants based on policies associated with the location where the was saved.

  This method should only be used to define a dynamic assembly in the current application domain. For more information, see the method overload.

  In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a dynamic assembly by using the , , and parameters are stored in the old XML metadata format. See Emitting Declarative Security Attributes.

  Defines a dynamic assembly using the specified name, access mode, evidence, and permission requests.

  A dynamic assembly with the specified name and features.

  The unique identity of the dynamic assembly. The mode in which the dynamic assembly will be accessed. The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. The required permissions request. The optional permissions request. The refused permissions request.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Declarative security for assembly level is no longer enforced")
  System.Reflection.Emit.AssemblyBuilder `` `` `` `` `` ``

  The permission requests specified for , , and are not used unless the dynamic assembly has been saved and reloaded into memory. To specify permission requests for a transient assembly that is never saved to disk, use an overload of the method that specifies evidence as well as requested permissions, and supply an object.

  During the development of code that emits dynamic assemblies, it is recommended that you use an overload of the method that specifies evidence and permissions, supply the evidence you want the dynamic assembly to have, and include in . Including in the parameter ensures that the MSIL is verified. A limitation of this technique is that it also causes to be thrown when used with code that demands full trust.

  This method should only be used to define a dynamic assembly in the current application domain. For more information, see the method overload.

  In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a dynamic assembly by using the , , and parameters are stored in the old XML metadata format. See Emitting Declarative Security Attributes.

  Defines a dynamic assembly using the specified name, access mode, storage directory, and permission requests.

  A dynamic assembly with the specified name and features.

  The unique identity of the dynamic assembly. The mode in which the dynamic assembly will be accessed. The name of the directory where the assembly will be saved. If is null, the directory defaults to the current directory. The required permissions request. The optional permissions request. The refused permissions request.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Declarative security for assembly level is no longer enforced")
  System.Reflection.Emit.AssemblyBuilder `` `` `` `` `` `` ``

  The permission requests specified for , , and are used only if is also supplied, or if the dynamic assembly is saved and reloaded into memory.

  During the development of code that emits dynamic assemblies, it is recommended that you include in . Including in the parameter ensures that the MSIL is verified. A limitation of this technique is that it also causes to be thrown when used with code that demands full trust.

  Only fully trusted callers can supply their when defining a dynamic . The runtime will map the through the security policy to determine the granted permissions. Partially trusted callers must supply a null . If is null, the runtime copies the permission sets, that is, the current grant and deny sets, from the caller's to the dynamic being defined and marks policy as resolved.

  If the dynamic is saved to disk, subsequent loads will get grants based on policies associated with the location where the was saved.

  This method should only be used to define a dynamic assembly in the current application domain. For more information, see the method overload.

  In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a dynamic assembly by using the , , and parameters are stored in the old XML metadata format. See Emitting Declarative Security Attributes.

  Defines a dynamic assembly using the specified name, access mode, storage directory, evidence, and permission requests.

  A dynamic assembly with the specified name and features.

  The unique identity of the dynamic assembly. The mode in which the dynamic assembly will be accessed. The name of the directory where the assembly will be saved. If is null, the directory defaults to the current directory. The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. The required permissions request. The optional permissions request. The refused permissions request.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Declarative security for assembly level is no longer enforced")
  System.Reflection.Emit.AssemblyBuilder `` `` `` `` `` `` `` ``

  The permission requests specified for , , and are used only if is also supplied, or if the dynamic assembly is saved and reloaded into memory.

  During the development of code that emits dynamic assemblies, it is recommended that you include in . Including in the parameter ensures that the MSIL is verified. A limitation of this technique is that it also causes to be thrown when used with code that demands full trust.

  Only fully trusted callers can supply their evidence when defining a dynamic . The runtime will map the through the security policy to determine the granted permissions. Partially trusted callers must supply null for the parameter. If is null, the runtime copies the permission sets, that is, the current grant and deny sets, from the caller's to the dynamic being defined and marks policy as resolved.

  If the dynamic is saved to disk, subsequent loads will get grants based on policies associated with the location where the was saved.

  If is true, the following methods of the resulting will be synchronized: , , , , , and . If two of these methods are called on different threads, one will block until the other completes.

  In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a dynamic assembly by using the , , and parameters are stored in the old XML metadata format. See Emitting Declarative Security Attributes.

  Defines a dynamic assembly using the specified name, access mode, storage directory, evidence, permission requests, and synchronization option.

  A dynamic assembly with the specified name and features.

  The unique identity of the dynamic assembly. The mode in which the dynamic assembly will be accessed. The name of the directory where the dynamic assembly will be saved. If is null, the directory defaults to the current directory. The evidence supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. The required permissions request. The optional permissions request. The refused permissions request. true to synchronize the creation of modules, types, and members in the dynamic assembly; otherwise, false.
- Method
  2.0.0.0
  4.0.0.0
  System.Obsolete("Declarative security for assembly level is no longer enforced")
  System.Reflection.Emit.AssemblyBuilder `` `` `` `` `` `` `` `` ``

  Use this method overload to specify attributes that do not work correctly unless they are applied when a dynamic assembly is created. For example, security attributes such as and do not work correctly if they are added after a dynamic assembly has been created.

  The permission requests specified for the , , and parameters are used only if the parameter is also supplied, or if the dynamic assembly is saved and reloaded into memory.

  When you develop code that emits dynamic assemblies, we recommend that you include the flag in the parameter. The inclusion of this flag ensures that the Microsoft intermediate language (MSIL) will be verified. This technique will detect the unintentional generation of unverifiable code, which otherwise is very difficult to detect. A limitation of this technique is that it also causes to be thrown when it is used with code that demands full trust.

  Only fully trusted callers can supply evidence when defining a dynamic . The runtime maps the through the security policy to determine the granted permissions. Partially trusted callers must supply null for the parameter. If is null, the runtime copies the permission sets (that is, the current grant and deny sets) from the caller's assembly to the dynamic assembly that is being defined, and marks the policy as resolved.

  If the dynamic assembly is saved to disk, subsequent loads will get grants based on policies that are associated with the location where the dynamic assembly was saved.

  If is true, the following methods of the resulting will be synchronized: , , , , , and . If two of these methods are called on different threads, one will block until the other is completed.

  In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a dynamic assembly by using the , , and parameters are stored in the old XML metadata format. For more information about these attributes, see Emitting Declarative Security Attributes.

  This method overload is introduced in the net_v35_long.

  Defines a dynamic assembly with the specified name, access mode, storage directory, evidence, permission requests, synchronization option, and custom attributes.

  A dynamic assembly with the specified name and features.

  The unique identity of the dynamic assembly. The mode in which the dynamic assembly will be accessed. The name of the directory where the dynamic assembly will be saved. If is null, the current directory is used. The evidence that is supplied for the dynamic assembly. The evidence is used unaltered as the final set of evidence used for policy resolution. The required permissions request. The optional permissions request. The refused permissions request. true to synchronize the creation of modules, types, and members in the dynamic assembly; otherwise, false. An enumerable list of attributes to be applied to the assembly, or null if there are no attributes.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  can specify a marshal-by-value, , or .

  Executes the code in another application domain that is identified by the specified delegate.

  A delegate that specifies a method to call.
- Property
  2.0.0.0
  4.0.0.0
  System.AppDomainManager To be added.

  An unmanaged host of the common language runtime (CLR) can provide a domain manager. The domain manager can participate in initializing the new application domain and supply other managers, such as a , that participate in the operations of the application domain.

  Gets the domain manager that was provided by the host when the application domain was initialized.

- Event
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.EventHandler

  The delegate for this event can perform any termination activities before the application domain is unloaded.

  Each application domain that needs to perform processing when it is unloaded should register an event handler for this event. A shared event handler should not be used, because the delegate does not identify the domain that is being unloaded.

  This event is never raised in the default application domain.

  Do not make assumptions about the thread the event is raised on. The event can be raised on a different thread than the one that called the method.

  To register an event handler for this event, you must have the required permissions, or a is thrown.

  For more information about handling events, see Events Overview.

  Occurs when an is about to be unloaded.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String To be added.

  To set the dynamic directory, assign a base directory path to the property of the object that will be used to create the new application domain. The base directory path you assign to the property is modified by the addition of a subdirectory whose simple name is the hash code of the string you assign to the property, so the format of the base directory is original path\hash code. The dynamic directory is a subdirectory of this base directory. Its simple name is the value of the property, so its format is original path\hash code\application name.

  Gets the directory that the assembly resolver uses to probe for dynamically created assemblies.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.Policy.Evidence To be added. To be added.

  Gets the associated with this application domain.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 ``

  The assembly begins executing at the entry point specified in the .NET Framework header.

  This method does not create a new process or application domain, and it does not execute the entry point method on a new thread.

  This method loads assemblies using the method. You can also execute assemblies using the method, which loads assemblies using the method.

  To create the to load and execute, use the method.

  Executes the assembly contained in the specified file.

  The value returned by the entry point of the assembly.

  The name of the file that contains the assembly to execute.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use an overload that does not take an Evidence parameter")
  System.Int32 `` ``

  The assembly begins executing at the entry point specified in the .NET Framework header.

  The method does not create a new process or application domain, and it does not execute the entry point method on a new thread.

  This method loads assemblies using the method. You can also execute assemblies using the method, which loads assemblies using the method.

  Executes the assembly contained in the specified file, using the specified evidence.

  The value returned by the entry point of the assembly.

  The name of the file that contains the assembly to execute. Evidence for loading the assembly.
- Method
  4.0.0.0
  System.Int32 `` ``

  The assembly begins executing at the entry point specified in the .NET Framework header.

  This method does not create a new process or application domain, and it does not execute the entry point method on a new thread.

  This method loads assemblies using the method. You can also execute assemblies using the method, which loads assemblies using the method.

  Executes the assembly contained in the specified file, using the specified arguments.

  The value that is returned by the entry point of the assembly.

  The name of the file that contains the assembly to execute. The arguments to the entry point of the assembly.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use an overload that does not take an Evidence parameter")
  System.Int32 `` `` ``

  The assembly begins executing at the entry point specified in the .NET Framework header.

  This method does not create a new process or application domain, and it does not execute the entry point method on a new thread.

  This method loads assemblies using the method. You can also execute assemblies using the method, which loads assemblies using the method.

  Executes the assembly contained in the specified file, using the specified evidence and arguments.

  The value returned by the entry point of the assembly.

  The name of the file that contains the assembly to execute. The supplied evidence for the assembly. The arguments to the entry point of the assembly.
- Method
  4.0.0.0
  System.Int32 `` `` `` ``

  The assembly begins executing at the entry point specified in the .NET Framework header.

  This method does not create a new process or application domain, and it does not execute the entry point method on a new thread.

  This method loads assemblies using the method. You can also execute assemblies using the method, which loads assemblies using the method.

  Executes the assembly contained in the specified file, using the specified arguments, hash value, and hash algorithm.

  The value that is returned by the entry point of the assembly.

  The name of the file that contains the assembly to execute. The arguments to the entry point of the assembly. Represents the value of the computed hash code. Represents the hash algorithm used by the assembly manifest.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use an overload that does not take an Evidence parameter")
  System.Int32 `` `` `` `` ``

  The assembly begins executing at the entry point specified in the .NET Framework header.

  This method does not create a new process or application domain, and it does not execute the entry point method on a new thread.

  This method loads assemblies using the method. You can also execute assemblies using the method, which loads assemblies using the method.

  Executes the assembly contained in the specified file, using the specified evidence, arguments, hash value, and hash algorithm.

  The value returned by the entry point of the assembly.

  The name of the file that contains the assembly to execute. The supplied evidence for the assembly. The arguments to the entry point of the assembly. Represents the value of the computed hash code. Represents the hash algorithm used by the assembly manifest.
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 ``

  The method provides similar functionality to the method, but specifies the assembly by display name or rather than by file location. Therefore, loads assemblies with the method rather than with the method.

  The assembly begins executing at the entry point specified in the .NET Framework header.

  This method does not create a new process or application domain, and it does not execute the entry point method on a new thread.

  To create the to load and execute, use the method.

  Executes an assembly given its display name.

  The value returned by the entry point of the assembly.

  The display name of the assembly. See .
- Method
  4.0.0.0
  System.Int32 `` `System.ParamArray`

  The method provides similar functionality to the method, but specifies the assembly by display name or rather than by file location. Therefore, loads assemblies with the method rather than with the method.

  The assembly begins executing at the entry point specified in the .NET Framework header.

  This method does not create a new process or application domain, and it does not execute the entry point method on a new thread.

  Executes the assembly given an , using the specified arguments.

  The value that is returned by the entry point of the assembly.

  An object representing the name of the assembly. Command-line arguments to pass when starting the process.
- Method
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use an overload that does not take an Evidence parameter")
  System.Int32 `` ``

  The method provides similar functionality to the method, but specifies the assembly by display name or rather than by file location. Therefore, loads assemblies with the method rather than with the method.

  The assembly begins executing at the entry point specified in the .NET Framework header.

  The method does not create a new process or application domain, and it does not execute the entry point method on a new thread.

  When you use the method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader.

  Executes an assembly given its display name, using the specified evidence.

  The value returned by the entry point of the assembly.

  The display name of the assembly. See . Evidence for loading the assembly.
- Method
  4.0.0.0
  System.Int32 `` `System.ParamArray`

  The method provides similar functionality to the method, but specifies the assembly by display name or rather than by file location. Therefore, loads assemblies with the method rather than with the method.

  The assembly begins executing at the entry point specified in the .NET Framework header.

  This method does not create a new process or application domain, and it does not execute the entry point method on a new thread.

  Executes the assembly given its display name, using the specified arguments.

  The value that is returned by the entry point of the assembly.

  The display name of the assembly. See . Command-line arguments to pass when starting the process.
- Method
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use an overload that does not take an Evidence parameter")
  System.Int32 `` `` `System.ParamArray`

  The method provides similar functionality to the method, but specifies the assembly by display name or rather than by file location. Therefore, loads assemblies with the method rather than with the method.

  The assembly begins executing at the entry point specified in the .NET Framework header.

  This method does not create a new process or application domain, and it does not execute the entry point method on a new thread.

  When you use the method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader.

  Executes the assembly given an , using the specified evidence and arguments.

  The value returned by the entry point of the assembly.

  An object representing the name of the assembly. Evidence for loading the assembly. Command-line arguments to pass when starting the process.
- Method
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use an overload that does not take an Evidence parameter")
  System.Int32 `` `` `System.ParamArray`

  The method provides similar functionality to the method, but specifies the assembly by display name or rather than by file location. Therefore, loads assemblies with the method rather than with the method.

  The assembly begins executing at the entry point specified in the .NET Framework header.

  This method does not create a new process or application domain, and it does not execute the entry point method on a new thread.

  When you use the method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader.

  Executes the assembly given its display name, using the specified evidence and arguments.

  The value returned by the entry point of the assembly.

  The display name of the assembly. See . Evidence for loading the assembly. Command-line arguments to pass when starting the process.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the friendly name of the current application domain.

  The friendly name of the default application domain is the file name of the process executable. For example, if the executable used to start the process is "c:\MyAppDirectory\MyAssembly.exe", the friendly name of the default application domain is "MyAssembly.exe".

  Gets the friendly name of this application domain.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Assembly[] To be added.

  Gets the assemblies that have been loaded into the execution context of this application domain.

  An array of assemblies in this application domain.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread.'")
  System.Int32

  Use the property, which is stable even when the .NET Framework is hosted by an environment that supports fibers (that is, lightweight threads).

  Gets the current thread identifier.

  A 32-bit signed integer that is the identifier of the current thread.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object ``

  Use this method to retrieve the value of an entry in an internal cache of name-data pairs that describe properties of this instance of .

  The cache automatically contains predefined system entries that are inserted when the application domain is created. You can inspect their values with the method, or the equivalent properties.

  You can insert or modify your own user defined name-data pairs with the method and inspect their values with the method.

  The following table describes the of each predefined system entry and its corresponding property.

  Value of 'name'

  Property

  "APPBASE"

  "LOADER_OPTIMIZATION"

  "APP_CONFIG_FILE"

  "DYNAMIC_BASE"

  "DEV_PATH"

  (no property)

  "APP_NAME"

  "PRIVATE_BINPATH"

  "BINPATH_PROBE_ONLY"

  "SHADOW_COPY_DIRS"

  "FORCE_CACHE_INSTALL"

  "CACHE_BASE"

  (application specific)

  "APP_LAUNCH_URL"

  (no property)

  "APP_LAUNCH_URL" represents the URL originally requested by the user, before any redirection. It is available only when the application has been launched with a browser such as Internet Explorer. Not all browsers provide this value.

  Gets the value stored in the current application domain for the specified name.

  The value of the property, or null if the property does not exist.

  The name of a predefined application domain property, or the name of an application domain property you have defined.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Type To be added.

  Gets the type of the current instance.

  The type of the current instance.

- Property
  2.0.0.0
  4.0.0.0
  get: System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Int32 To be added. To be added.

  Gets an integer that uniquely identifies the application domain within the process.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object To be added.

  Gives the an infinite lifetime by preventing a lease from being created.

  Always null.

- Method
  4.0.0.0
  System.Nullable<System.Boolean> ``

  This method tests whether the current application domain reverses breaking changes that were introduced in the net_v40_long. The following table provides examples of compatibility switches that can be set to restore the behavior of earlier versions of the .NET Framework.

  Switch

  Meaning

  "NetFx40_LegacySecurityPolicy"

  Code access security (CAS) for the net_v35_short is enabled in this application domain. See <NetFx40_LegacySecurityPolicy> Element.

  "NetFx40_Legacy20SortingBehavior"

  String sorting defaults for the net_v35_short are enabled in this application domain. Its success requires sort00001000.dll to be installed.

  "NetFx40_Legacy40SortingBehavior"

  String sorting defaults for the net_v40_short and Unicode 5.0 are enabled in this application domain. Its success requires sort00060101.dll to be installed.

  "NetFx40_TimeSpanLegacyFormatMode"

  formatting behavior for the net_v35_short is enabled in this application domain.

  Gets a nullable Boolean value that indicates whether any compatibility switches are set, and if so, whether the specified compatibility switch is set.

  A null reference (Nothing in Visual Basic) if no compatibility switches are set; otherwise, a Boolean value that indicates whether the compatibility switch that is specified by is set.

  The compatibility switch to test.
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean

  Every managed process has a default application domain. Execution begins in the default domain.

  Returns a value that indicates whether the application domain is the default application domain for the process.

  true if the current object represents the default application domain for the process; otherwise, false.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  The finalization method for an object provides you an opportunity to perform any necessary cleanup operations before the object is garbage collected. After finalization, the object is accessible but in an invalid state and therefore unusable. Eventually, garbage collection completes and reclaims the object.

  An object's finalization method is called in one of the following situations: during garbage collection, when the common language runtime is shutting down, or when the application domain that contains the object is unloaded. The method returns true only in the last case; it does not return true if finalization results from routine garbage collection or from CLR shutdown.

  To determine whether finalization is due to CLR shutdown, use the property. It returns true if finalization is due to an application domain being unloaded or to the CLR shutting down.

  While executing in your finalization method during domain unloading, you might want to access another object that is referenced by a static field and has a finalization method. However, you cannot reliably do so because the accessed object might already have been finalized.

  An exception to this rule is the class, which contains static fields that reference stream objects, but is implemented specially so you can always write to the system console, even during domain unloading or system shutdown.

  Use this method in an object's finalization method to determine whether the application domain that contains the object is unloading. If that is the case, you cannot reliably access any object that has a finalization method and is referenced by a static field.

  Indicates whether this application domain is unloading, and the objects it contains are being finalized by the common language runtime.

  true if this application domain is unloading and the common language runtime has started invoking finalizers; otherwise, false.

- Property
  4.0.0.0
  System.Boolean To be added.

  This method always returns true for the default application domain of an application that runs on the desktop. It returns false for a sandboxed application domain that was created by using the method overload, unless the permissions that are granted to the application domain are equivalent to full trust.

  Gets a value that indicates whether assemblies that are loaded into the current application domain execute with full trust.

- Property
  4.0.0.0
  System.Boolean To be added.

  This property returns true for sandboxed application domains that were created by using the method overload. Sandboxed application domains have a homogenous set of permissions; that is, the same set of permissions is granted to all partially trusted assemblies that are loaded into the application domain. A sandboxed application domain optionally has a list of strong-named assemblies that are exempt from this permission set, and instead run with full trust.

  Fully trusted code can use the property to determine the homogenous grant set of a sandboxed application domain.

  This property also returns true for the default application domain of a desktop application, because that application domain grants full trust to all assemblies.

  Gets a value that indicates whether the current application domain has a set of permissions that is granted to all assemblies that are loaded into the application domain.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Assembly ``

  Beginning with the net_v40_long, the trust level of an assembly that is loaded by using this method is the same as the trust level of the application domain.

  This method should be used only to load an assembly into the current application domain. This method is provided as a convenience for interoperability callers who cannot call the static method. To load assemblies into other application domains, use a method such as .

  For information that is common to all overloads of this method, see the method overload.

  Loads the with a common object file format (COFF) based image containing an emitted .

  The loaded assembly.

  An array of type byte that is a COFF-based image containing an emitted assembly.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Assembly ``

  This method should be used only to load an assembly into the current application domain. This method is provided as a convenience for interoperability callers who cannot call the static method. To load assemblies into other application domains, use a method such as .

  If a version of the requested assembly is already loaded, this method returns the loaded assembly, even if a different version is requested.

  Supplying a partial assembly name for is not recommended. (A partial name omits one or more of culture, version, or public key token. For overloads that take a string instead of an object, "MyAssembly, Version=1.0.0.0" is an example of a partial name and "MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=18ab3442da84b47" is an example of a full name.) Using partial names has a negative effect on performance. In addition, a partial assembly name can load an assembly from the global assembly cache only if there is an exact copy of the assembly in the application base directory ( or ).

  If the current object represents application domain A, and the method is called from application domain B, the assembly is loaded into both application domains. For example, the following code loads MyAssembly into the new application domain ChildDomain and also into the application domain where the code executes:

  code reference: System.AppDomain.Load#1

  The assembly is loaded into both domains because does not derive from , and therefore the return value of the method cannot be marshaled. Instead, the common language runtime tries to load the assembly into the calling application domain. The assemblies that are loaded into the two application domains might be different if the path settings for the two application domains are different.

  If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, the property is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown.

  Loads an given its .

  The loaded assembly.

  An object that describes the assembly to load.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Assembly ``

  This method should be used only to load an assembly into the current application domain. This method is provided as a convenience for interoperability callers who cannot call the static method. To load assemblies into other application domains, use a method such as .

  For information that is common to all overloads of this method, see the method overload.

  Loads an given its display name.

  The loaded assembly.

  The display name of the assembly. See .
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Reflection.Assembly `` ``

  Beginning with the net_v40_long, the trust level of an assembly that is loaded by using this method is the same as the trust level of the application domain.

  This method should be used only to load an assembly into the current application domain. This method is provided as a convenience for interoperability callers who cannot call the static method. To load assemblies into other application domains, use a method such as .

  For information that is common to all overloads of this method, see the method overload.

  Loads the with a common object file format (COFF) based image containing an emitted . The raw bytes representing the symbols for the are also loaded.

  The loaded assembly.

  An array of type byte that is a COFF-based image containing an emitted assembly. An array of type byte containing the raw bytes representing the symbols for the assembly.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use an overload that does not take an Evidence parameter")
  System.Reflection.Assembly `` ``

  This method should be used only to load an assembly into the current application domain. This method is provided as a convenience for interoperability callers who cannot call the static method. To load assemblies into other application domains, use a method such as .

  For information that is common to all overloads of this method, see the method overload.

  Loads an given its .

  The loaded assembly.

  An object that describes the assembly to load. Evidence for loading the assembly.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use an overload that does not take an Evidence parameter")
  System.Reflection.Assembly `` ``

  This method should be used only to load an assembly into the current application domain. This method is provided as a convenience for interoperability callers who cannot call the static method. To load assemblies into other application domains, use a method such as .

  For information that is common to all overloads of this method, see the method overload.

  Loads an given its display name.

  The loaded assembly.

  The display name of the assembly. See . Evidence for loading the assembly.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use an overload that does not take an Evidence parameter")
  System.Reflection.Assembly `` `` ``

  Beginning with the net_v40_long, the trust level of an assembly that is loaded by using this method is the same as the trust level of the application domain.

  This method should be used only to load an assembly into the current application domain. This method is provided as a convenience for interoperability callers who cannot call the static method. To load assemblies into other application domains, use a method such as .

  For information that is common to all overloads of this method, see the method overload.

  Loads the with a common object file format (COFF) based image containing an emitted . The raw bytes representing the symbols for the are also loaded.

  The loaded assembly.

  An array of type byte that is a COFF-based image containing an emitted assembly. An array of type byte containing the raw bytes representing the symbols for the assembly. Evidence for loading the assembly.
- Property
  4.0.0.0
  System.Boolean To be added.

  This static property (Shared property in Visual Basic) controls CPU and memory monitoring of all the application domains in the process.

  If you attempt to set this property to false, a exception is thrown, even if the current value of the property is false.

  Once monitoring is enabled, you can use the , , , and instance properties to monitor CPU and memory use of individual application domains.

  Gets or sets a value that indicates whether CPU and memory monitoring of application domains is enabled for the current process. Once monitoring is enabled for a process, it cannot be disabled.

- Property
  4.0.0.0
  System.Int64 To be added.

  The statistics are updated with each garbage collection. However, they are guaranteed to be accurate only after a full, blocking collection; that is, a collection that includes all generations and that stops the application while collection occurs. For example, the method overload performs a full, blocking collection. (Concurrent collection occurs in the background and does not block the application.)

  Gets the number of bytes that survived the last collection and that are known to be referenced by the current application domain.

- Property
  4.0.0.0
  System.Int64 To be added.

  After a full, blocking collection, this number represents the number of bytes currently held live on managed heaps. It should be close to the number reported by the method. After an ephemeral collection, this number represents the number of bytes currently held live in ephemeral generations.

  Gets the total bytes that survived from the last collection for all application domains in the process.

- Property
  4.0.0.0
  System.Int64 To be added. To be added.

  Gets the total size, in bytes, of all memory allocations that have been made by the application domain since it was created, without subtracting memory that has been collected.

- Property
  4.0.0.0
  System.TimeSpan To be added.

  The total time that is reported for an application domain includes the time each thread in the process spent executing in that application domain.

  A thread that calls into unmanaged code is still associated with an application domain, and the processor time spent executing the unmanaged code is reported for the application domain where the call was made.

  When a thread is blocked or sleeping, it does not consume processor time.

  Gets the total processor time that has been used by all threads while executing in the current application domain, since the process started.

- Property
  4.0.0.0
  System.Security.PermissionSet To be added.

  Sandboxed application domains that were created by using the method overload have a homogenous set of permissions; that is, the same set of permissions is granted to all partially trusted assemblies that are loaded into the application domain. A sandboxed application domain optionally has a list of strong-named assemblies that are exempt from this permission set, and instead run with full trust.

  Gets the permission set of a sandboxed application domain.

- Event
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.EventHandler

  The for this event can perform termination activities, such as closing files, releasing storage and so on, before the process ends.

  Beginning with the .NET Framework version 2.0, this event is raised in each application domain that registers an event handler.

  The total execution time of all event handlers is limited, just as the total execution time of all finalizers is limited at process shutdown. The default is two seconds. An unmanaged host can change this execution time by calling the ICLRPolicyManager::SetTimeout method with the OPR_ProcessExit enumeration value.

  In the .NET Framework versions 1.0 and 1.1, this event is raised only in the default application domain, and only if an event handler is registered in the default application domain.

  To register an event handler for this event, you must have the required permissions, or a is thrown.

  For more information about handling events, see Events Overview.

  Occurs when the default application domain's parent process exits.

- Event
  2.0.0.0
  4.0.0.0
  System.ResolveEventHandler

  In the reflection-only context, dependencies are not resolved automatically. They must be preloaded or returned by the handler for this event. This event is raised when an assembly has a dependency that is not already loaded into the reflection-only context. The missing dependency is specified by the property. The for this event must return an assembly that satisfies the dependency. The assembly that is returned must be loaded into the reflection-only context.

  This event is raised only for missing dependencies of the assembly that you are loading into the reflection-only context (for example, by using the method). It is not raised if the assembly that you are loading cannot be found.

  Beginning with the net_v40_long, the property returns the assembly that requested the assembly load that could not be resolved. Knowing the identity of the requesting assembly might be useful in identifying the correct version of the dependency, if more than one version is available. For more information, see .

  For this event, the property returns the assembly name before policy is applied.

  For more information about handling events, see Consuming Events.

  Occurs when the resolution of an assembly fails in the reflection-only context.

- Method
  2.0.0.0
  4.0.0.0
  System.Reflection.Assembly[]

  This method returns the assemblies that have been loaded into the reflection-only context. To get the assemblies that have been loaded for execution, use the method.

  Returns the assemblies that have been loaded into the reflection-only context of the application domain.

  An array of objects that represent the assemblies loaded into the reflection-only context of the application domain.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String To be added.

  Private assemblies are deployed in the same directory structure as the application. If the path specified by the property is not under , it is ignored.

  This property returns the value set using .

  Gets the path under the base directory where the assembly resolver should probe for private assemblies.

- Event
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.ResolveEventHandler

  The for this event can attempt to locate the assembly containing the resource and return it.

  This event is not raised if resolution fails because no file can be found for a valid linked resource. It is raised if a manifest resource stream cannot be found, but it is not raised if an individual resource key cannot be found.

  Beginning with the net_v40_long, the property contains the assembly that requested the resource. For more information, see .

  To register an event handler for this event, you must have the required permissions, or a is thrown.

  For more information about handling events, see Events Overview.

  Occurs when the resolution of a resource fails because the resource is not a valid linked or embedded resource in the assembly.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("AppDomain policy levels are obsolete")
  System.Void ``

  Call this method before an assembly is loaded into the in order for the security policy to have effect.

  Establishes the security policy level for this application domain.

  The security policy level.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use AppDomainSetup.SetCachePath")
  System.Void ``

  The cache path is ignored if the property is not set. See the property.

  For more information on shadow copying see Shadow Copying Assemblies.

  Establishes the specified directory path as the location where assemblies are shadow copied.

  The fully qualified path to the shadow copy location.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  Use this method to insert an entry, or modify the value of an entry in an internal cache of name-data pairs that describe properties of this instance of .

  The cache automatically contains predefined system entries that are inserted when the application domain is created. You cannot insert or modify system entries with this method. You can inspect their values with the method, or the equivalent properties described in .

  You can insert or modify your own user defined name-data pairs with this method and inspect their values with the method.

  Assigns the specified value to the specified application domain property.

  The name of a user-defined application domain property to create or change. The value of the property.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  Use this method to insert or modify your own user-defined entries in an internal cache of name/data pairs that describe properties of the application domain. When you insert an entry, you can specify a permission demand to enforce when the entry is retrieved.

  You cannot use this method to assign a security demand to a system-defined property string.

  The cache automatically contains predefined system entries that are inserted when the application domain is created. You cannot insert or modify system entries with this method. You can inspect their values with the method or the equivalent properties described in the Remarks section for the method.

  Assigns the specified value to the specified application domain property, with a specified permission to demand of the caller when the property is retrieved.

  The name of a user-defined application domain property to create or change. The value of the property. The permission to demand of the caller when the property is retrieved.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use AppDomainSetup.DynamicBase")
  System.Void ``

  This method sets the property of the internal associated with this instance.

  Establishes the specified directory path as the base directory for subdirectories where dynamically generated files are stored and accessed.

  The fully qualified path that is the base directory for subdirectories where dynamic assemblies are stored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  Setting this value will only be effective if you set it before using the property. For example, if you set to a given principal (for example, a generic principal) and then use the method to set the to , the current principal will remain the generic principal.

  Specifies how principal and identity objects should be attached to a thread if the thread attempts to bind to a principal while executing in this application domain.

  One of the values that specifies the type of the principal object to attach to threads.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use AppDomainSetup.ShadowCopyFiles")
  System.Void

  For more information on shadow copying, see Shadow Copying Assemblies.

  Turns on shadow copying.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use AppDomainSetup.ShadowCopyDirectories")
  System.Void ``

  By default, a shadow copy includes all assemblies found through probing. The method restricts the shadow copy to the assemblies in the directories specified by .

  The method does not specify additional directories to be searched for assemblies. Assemblies to be shadow-copied must already be located in the search path, for example under . The method specifies which search paths are eligible to be shadow-copied.

  This method sets the property of the internal associated with this instance.

  For more information on shadow copying, see Shadow Copying Assemblies.

  Establishes the specified directory path as the location of assemblies to be shadow copied.

  A list of directory names, where each name is separated by a semicolon.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` To be added.

  Sets the default principal object to be attached to threads if they attempt to bind to a principal while executing in this application domain.

  The principal object to attach to threads.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.AppDomainSetup To be added. To be added.

  Gets the application domain configuration information for this instance.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  For more information, see and Shadow Copying Assemblies.

  Gets an indication whether the application domain is configured to shadow copy files.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  This method is for access to managed classes from unmanaged code, and should not be called from managed code. For more information about IDispatch::GetTypeInfo, see the MSDN Library.

  Retrieves the type information for an object, which can then be used to get the type information for an interface.

  The type information to return. The locale identifier for the type information. Receives a pointer to the requested type information object.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` To be added. To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` `` `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  The string returned by this method includes the friendly name of the application domain.

  This method overrides .

  Obtains a string representation that includes the friendly name of the application domain and any context policies.

  A string formed by concatenating the literal string "Name:", the friendly name of the application domain, and either string representations of the context policies or the string "There are no context policies."

  0
- Event
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.ResolveEventHandler

  The event occurs when the common language runtime is unable to determine the assembly that can create the requested type. This can occur if the type is defined in a dynamic assembly, or the type is not defined in a dynamic assembly but the runtime does not know which assembly the type is defined in. The latter situation can occur when is called with a type name that is not qualified with the assembly name.

  The for this event can attempt to locate and create the type.

  However, the event does not occur if the runtime knows it is not possible to find a type in certain assemblies. For example, this event does not occur if the type is not found in a static assembly because the runtime knows types cannot be added dynamically to static assemblies.

  Beginning with the net_v40_long, the property contains the assembly that requested the type. For more information, see .

  To register an event handler for this event, you must have the required permissions, or a is thrown.

  For more information about handling events, see Events Overview.

  Occurs when the resolution of a type fails.

- Event
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.UnhandledExceptionEventHandler

  This event provides notification of uncaught exceptions. It allows the application to log information about the exception before the system default handler reports the exception to the user and terminates the application. If sufficient information about the state of the application is available, other actions may be undertaken — such as saving program data for later recovery. Caution is advised, because program data can become corrupted when exceptions are not handled.

  In the .NET Framework versions 1.0 and 1.1, application termination and debugging options are reported to the user before this event is raised, rather than after.

  This event can be handled in any application domain. However, the event is not necessarily raised in the application domain where the exception occurred. An exception is unhandled only if the entire stack for the thread has been unwound without finding an applicable exception handler, so the first place the event can be raised is in the application domain where the thread originated.

  In the .NET Framework versions 1.0 and 1.1, this event occurs only for the default application domain that is created by the system when an application is started. If an application creates additional application domains, specifying a delegate for this event in those applications domains has no effect.

  If the event is handled in the default application domain, it is raised there for any unhandled exception in any thread, no matter what application domain the thread started in. If the thread started in an application domain that has an event handler for , the event is raised in that application domain. If that application domain is not the default application domain, and there is also an event handler in the default application domain, the event is raised in both application domains.

  For example, suppose a thread starts in application domain "AD1", calls a method in application domain "AD2", and from there calls a method in application domain "AD3", where it throws an exception. The first application domain in which the event can be raised is "AD1". If that application domain is not the default application domain, the event can also be raised in the default application domain.

  The common language runtime suspends thread aborts while event handlers for the event are executing.

  If the event handler has a attribute with the appropriate flags, the event handler is treated as a constrained execution region.

  Starting with the net_v40_long, this event is not raised for exceptions that corrupt the state of the process, such as stack overflows or access violations, unless the event handler is security-critical and has the attribute.

  In the .NET Framework versions 1.0 and 1.1, an unhandled exception that occurs in a thread other than the main application thread is caught by the runtime and therefore does not cause the application to terminate. Thus, it is possible for the event to be raised without the application terminating. Starting with the .NET Framework version 2.0, this backstop for unhandled exceptions in child threads was removed, because the cumulative effect of such silent failures included performance degradation, corrupted data, and lockups, all of which were difficult to debug. For more information, including a list of cases in which the runtime does not terminate, see Exceptions in Managed Threads.

  To register an event handler for this event, you must have the required permissions, or a is thrown.

  For more information about handling events, see Events Overview.

  ## Other Events for Unhandled Exceptions

  For certain application models, the event can be preempted by other events if the unhandled exception occurs in the main application thread.

  In applications that use Windows Forms, unhandled exceptions in the main application thread cause the event to be raised. If this event is handled, the default behavior is that the unhandled exception does not terminate the application, although the application is left in an unknown state. In that case, the event is not raised. This behavior can be changed by using the application configuration file, or by using the method to change the mode to before the event handler is hooked up. This applies only to the main application thread. The event is raised for unhandled exceptions thrown in other threads.

  Starting with Microsoft Visual Studio 2005, the Visual Basic application framework provides another event for unhandled exceptions in the main application thread. See the event. This event has an event arguments object with the same name as the event arguments object used by , but with different properties. In particular, this event arguments object has an property that allows the application to continue running, ignoring the unhandled exception (and leaving the application in an unknown state). In that case, the event is not raised.

  Occurs when an exception is not caught.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.MayCorruptAppDomain, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Void `` is . could not be unloaded.

  In the .NET Framework version 2.0 there is a thread dedicated to unloading application domains. This improves reliability, especially when the .NET Framework is hosted. When a thread calls , the target domain is marked for unloading. The dedicated thread attempts to unload the domain, and all threads in the domain are aborted. If a thread does not abort, for example because it is executing unmanaged code, or because it is executing a finally block, then after a period of time a is thrown in the thread that originally called . If the thread that could not be aborted eventually ends, the target domain is not unloaded. Thus, in the .NET Framework version 2.0 is not guaranteed to unload, because it might not be possible to terminate executing threads.

  In some cases, calling causes an immediate , for example if it is called in a finalizer.

  The threads in are terminated using the method, which throws a in the thread. Although the thread should terminate promptly, it can continue executing for an unpredictable amount of time in a finally clause.

  ## Version Compatibility

  In the .NET Framework version 1.0 and 1.1 if the thread that calls is running in , another thread is started to perform the unload operation. If cannot be unloaded, a is thrown in that thread, not in the original thread that called . However, if the thread that calls is running outside , that thread receives the exception.

  Unloads the specified application domain.

  An application domain to unload. 0
0