using System;
using System.Collections.Generic;
using System.Reflection;
public class Test
{
public static void Main()
{
Assembly assembly = Assembly.GetExecutingAssembly();
Console.WriteLine("The name of the assembly: " + assembly.FullName);
// The name of the assembly: prog, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Console.WriteLine("Path to the assembly: " + assembly.CodeBase);
// Path to the assembly: file:///home/UekYpj/prog.exe
Console.WriteLine("Is in GAC: " + assembly.GlobalAssemblyCache);
// Is in GAC: False
Console.WriteLine("The version of the CLR: " + assembly.ImageRuntimeVersion);
// The version of the CLR: v2.0.50727
Console.WriteLine("The path or UNC location of the assembly: " + assembly.Location);
// The path or UNC location of the assembly: /home/MHap07/prog.exe
// // Is not compiled by ideone.com, possible coz it's using Mono
// var typesCollection;
//
// typesCollection = assembly.DefinedTypes;
// foreach (var element in typesCollection)
// Console.Write(element+", ");
// // Test, PrivateClass
//
// typesCollection = assembly.ExportedTypes;
// foreach (var element in typesCollection)
// Console.Write(element+", ");
// // Test,
//
// Console.WriteLine("Set of security rules the CLR enforces for the assembly: " + assembly.SecurityRuleSet);
// // Set of security rules the CLR enforces for the assembly: Level2
}
}
class PrivateClass
{
}