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