/// <summary> /// 产品版本 /// </summary> public static string AssemblyVersion { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false); if (attributes.Length > 0) { AssemblyInformationalVersionAttribute informationalVersionAttribute = (AssemblyInformationalVersionAttribute)attributes[0]; if (informationalVersionAttribute.InformationalVersion != "") { return informationalVersionAttribute.InformationalVersion; } } return Assembly.GetExecutingAssembly().GetName().Version.ToString(); } }