Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

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

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);
  }
}

No comments yet.

Leave a Comment