You can nicely retrieve the major and minor version of your application by using the Version class to retrieve and decode the version from the assembly.
Version vrs = new Version(Application.ProductVersion); MessageBox.Show(“Major: ” + vrs.Major + “\r\nMinor: ” + vrs.Minor); |
Also, you can get the build and revision number using the rest of the properties:
Version vrs = new Version(Application.ProductVersion); MessageBox.Show(“Build: ” + vrs.Build + “\r\nRevision: ” + vrs.Revision); |