AssemblyName Class describes an assembly's unique identity in full. : AssemblyName « Reflection « C# / C Sharp






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

1.Display information about each module of this assembly
2.Initializes a new instance of the AssemblyName class with the specified display name.
3.Gets or sets the major, minor, build, and revision numbers of the assembly.