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