Obtenir l’application de domaine courant pour le Thread courant: non édité

Author:

Charger,une,Assemblée,avec,un,nom
{filelink=17570}

using System;
using System.Reflection;
using System.Security.Policy;  

class ADSetupInformation
{
  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);
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *