using System.Reflection;
获得AssemblyInfo.cs中指定的版本号
Assembly a = Assembly.GetAssembly(typeof(Try));
AssemblyName name = a.GetName();
Console.WriteLine(name.Version);
也可以用Application.ProductVersion
using System.Reflection;
获得AssemblyInfo.cs中指定的版本号
Assembly a = Assembly.GetAssembly(typeof(Try));
AssemblyName name = a.GetName();
Console.WriteLine(name.Version);
也可以用Application.ProductVersion