AssemblyName Class describes an assembly's unique identity in full.
using System;
using System.Reflection;
class Module1
{
public static void Main()
{
Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
Console.WriteLine("Assembly identity={0}", a.FullName);
Console.WriteLine("Codebase={0}", a.CodeBase);
foreach (AssemblyName an in a.GetReferencedAssemblies() )
{
Console.WriteLine("Name={0}, Version={1}, Culture={2}, PublicKey token={3}", an.Name, an.Version, an.CultureInfo.Name, (BitConverter.ToString (an.GetPublicKeyToken())));
}
}
}
Related examples in the same category