Gets the friendly name of this application domain.
using System;
using System.Reflection;
using System.Security.Policy;
class MainClass
{
public static void Main()
{
AppDomainSetup domaininfo = new AppDomainSetup();
domaininfo.ApplicationBase = System.Environment.CurrentDirectory;
Evidence adevidence = AppDomain.CurrentDomain.Evidence;
AppDomain domain = AppDomain.CreateDomain("MyDomain", adevidence, domaininfo);
Console.WriteLine("Host domain: " + AppDomain.CurrentDomain.FriendlyName);
Console.WriteLine("new child domain: " + domain.FriendlyName);
Console.WriteLine("Application base is: " + domain.SetupInformation.ApplicationBase);
AppDomain.Unload(domain);
}
}
Related examples in the same category