CreateDomain Method

AppDomainManager.CreateDomain Method (String, Evidence, AppDomainSetup)


Returns a new or existing application domain.

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

public virtual AppDomain CreateDomain(
	string friendlyName,
	Evidence securityInfo,
	AppDomainSetup appDomainInfo


Type: System.String

The friendly name of the domain.

Type: System.Security.Policy.Evidence

An object that contains evidence mapped through the security policy to establish a top-of-stack permission set.

Type: System.AppDomainSetup

An object that contains application domain initialization information.

Return Value

Type: System.AppDomain

A new or existing application domain.

The friendly name, specified by the friendlyName parameter, can be displayed in user interfaces to identify the domain. For more information, see the FriendlyName property.

The default CreateDomain method calls the protected CreateDomainHelper method to create the AppDomain. Overrides of this method do not need to call the CreateDomainHelper method but can return an existing domain.

Notes to Inheritors:

When you inherit from the AppDomainManager class and override the CreateDomain method, you can perform custom application domain initialization activities before calling the CreateDomainHelper method, or not call the helper method at all. For example, you could modify the evidence passed in as securityInfo, update the fields of the associated AppDomainSetup, or reuse an exiting domain.

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft