Gets or sets the major, minor, build, and revision numbers of the assembly. : AssemblyName « Reflection « C# / C Sharp






Gets or sets the major, minor, build, and revision numbers of the assembly.

 

using System;
using System.Reflection;

[assembly:AssemblyVersion("1.1.0.0")]

class Example
{
    static void Main()
    {
        Console.WriteLine("The version of the currently executing assembly is: {0}",
            Assembly.GetExecutingAssembly().GetName().Version);

        Console.WriteLine("The version of mscorlib.dll is: {0}",
            typeof(String).Assembly.GetName().Version);
    }
}

   
  








Related examples in the same category

1.AssemblyName Class describes an assembly's unique identity in full.
2.Display information about each module of this assembly
3.Initializes a new instance of the AssemblyName class with the specified display name.