Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Afficher le nom de l’application de domain

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

using System;
using System.Reflection;
using System.Security.Policy;
 
class MainClass
{
  public static void Main()
  {
 
    AppDomainSetup InfoDomaine = new AppDomainSetup();
    InfoDomaine.ApplicationBase = System.Environment.CurrentDirectory;
 
    Evidence evidence = AppDomain.CurrentDomain.Evidence;
 
    AppDomain domaine = AppDomain.CreateDomain("MonDomaine", evidence, InfoDomaine);
 
    Console.WriteLine("hôte de domaine: " + AppDomain.CurrentDomain.FriendlyName);
    Console.WriteLine("Nouveau Fils de domaine: " + domaine.FriendlyName);
    Console.WriteLine("Application de Base: " + domaine.SetupInformation.ConfigurationFile);
    Console.WriteLine("Répertoire de base de l'application: " + domaine.BaseDirectory);
    AppDomain.Unload(domaine);
  }
}

No comments yet.

Leave a Comment