Get version and build number while app is running

  • Thread starter Thread starter moondaddy
  • Start date Start date
M

moondaddy

How would I get the version and build number while the app is running?
Whats the standard way of getting this info for an app's about window?
 
Hello, moondaddy!

m> How would I get the version and build number while the app is running?
m> Whats the standard way of getting this info for an app's about window?

System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
Hi

We can use the reflection to get the current running assembly and get its
version

======================================================================
// Version information for an assembly consists of the following four
values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.2.3.4")]
======================================================================

private void button1_Click(object sender, EventArgs e)
{
string v =
Assembly.GetExecutingAssembly().GetName().Version.ToString();
MessageBox.Show(v);
}


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top