什么是获得C#语法大会 AssemblyInformationalVersion
在运行时的属性值?例如:
[总成:AssemblyInformationalVersion(1.2.3.4)]
使用System.Reflection.Assembly
使用System.Diagnostics.FileVersionInfo
// ...
公共字符串GetInformationalVersion(议会大会){
返回FileVersionInfo.GetVersionInfo(assembly.Location).ProductVersion;
}
What is the C# syntax for getting the assembly's AssemblyInformationalVersion
attribute value at runtime? Example:
[assembly: AssemblyInformationalVersion("1.2.3.4")]
using System.Reflection.Assembly
using System.Diagnostics.FileVersionInfo
// ...
public string GetInformationalVersion(Assembly assembly) {
return FileVersionInfo.GetVersionInfo(assembly.Location).ProductVersion;
}