System.AppDomain.CreateDomain Method

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

Syntax

public static AppDomain CreateDomain (string friendlyName, System.Security.Policy.Evidence securityInfo)

Parameters

friendlyName
The friendly name of the domain. This friendly name can be displayed in user interfaces to identify the domain. For more information, see AppDomain.FriendlyName.
securityInfo
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.

Returns

The newly created application domain.

Remarks

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

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

Note:

Do not use this method overload to create sandboxed application domains. Beginning with the net_v40_long, the evidence that is supplied for securityInfo no longer affects the grant set of the application domain. Use the AppDomain.CreateDomain(string, System.Security.Policy.Evidence, AppDomainSetup, System.Security.PermissionSet, System.Security.Policy.StrongName[]) method overload to create sandboxed application domains.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0