AppDomainSetup setup = new AppDomainSetup(); setup.ApplicationBase = @"C:\MyApplication\";
AppDomainSetup setup = new AppDomainSetup(); setup.ConfigurationFile = @"C:\MyApplication\MyConfig.config";
AppDomainSetup setup = new AppDomainSetup(); PermissionSet permissionSet = new PermissionSet(PermissionState.Unrestricted); setup.PermissionSet = permissionSet;This code sets the permission set required by the new application domain to unrestricted. The System AppDomainSetup class is part of the System.dll library.