AppDomain.GetAssemblies : AppDomain « System « C# / C Sharp by API






AppDomain.GetAssemblies

  
using System;
using System.Reflection;
using System.Windows.Forms;
  
public class MainClass
{
  public static int Main(string[] args)
  {
    AppDomain defaultAD = AppDomain.CurrentDomain;
    Console.WriteLine("This call loaded System.Windows.Forms.dll and System.dll");

    Assembly[] loadedAssemblies = defaultAD.GetAssemblies();      
    Console.WriteLine("Here are the assemblies loaded in {0}\n",defaultAD.FriendlyName);
    foreach(Assembly a in loadedAssemblies)
    {
      Console.WriteLine("-> Name: {0}", a.GetName().Name);
      Console.WriteLine("-> Version: {0}\n", a.GetName().Version);
    }

    return 0;
  }
}

   
    
  








Related examples in the same category

1.AppDomain.CreateDomain
2.AppDomain.CreateInstance
3.AppDomain.CreateInstanceAndUnwrap
4.AppDomain.CreateInstanceFromAndUnwrap
5.AppDomain.CurrentDomain.FriendlyName
6.AppDomain.CurrentDomain
7.AppDomain.DefineDynamicAssembly
8.AppDomain.DoCallBack
9.AppDomain.DomainUnload
10.AppDomain.FriendlyName
11.AppDomain.GetData
12.AppDomain.OnUnhandledException
13.AppDomain.ProcessExit
14.AppDomain.SetData
15.AppDomain.SetPrincipalPolicy
16.AppDomain.Unload