Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
/// <summary> /// Information about the currently executing assembly, this is used to determine /// our version, etc. /// </summary> private System.Reflection.Assembly m_assemblyInfo; public string version { get { string ourVersion = string.Empty; //if running the deployed application, you can get the version // from the ApplicationDeployment information. If you try // to access this when you are running in Visual Studio, it will not work. if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed) ourVersion = ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString(); else if (m_assemblyInfo != null) ourVersion = m_assemblyInfo.GetName().Version.ToString(); return ourVersion; } }
Remember Me