Configure the AppDomainSetup : AppDomain « Development Class « C# / C Sharp






Configure the AppDomainSetup

using System;

class Test
{
    public static void Main()
    {
        AppDomainSetup setupInfo = new AppDomainSetup();

        setupInfo.ApplicationBase = @"C:\MyRootDirectory";
        setupInfo.ConfigurationFile = "MyApp.config";
        setupInfo.PrivateBinPath = "bin;plugins;external";

        AppDomain newDomain = 
            AppDomain.CreateDomain("My New AppDomain", null, setupInfo);
    }
}



           
       








Related examples in the same category

1.AppDomain.CreateDomain
2.SetData, GetData
3.SetPrincipalPolicy
4.FriendlyName
5.creates three instances of the same type. A local and two remote proxies to object instances are constructed:
6.OnUnhandledException method is added to the AppDomain.UnhandledException event