|
If you want to know the version of currently executing assembly then you can use Application.ProductVersion. Here is code snippet
which can be used to do this.
Version version = new Version(Application.ProductVersion);
MessageBox.Show(version.ToString());
To extract major, minor version use
Version version = new Version(Application.ProductVersion);
MessageBox.Show("Version: {0}.{1}.{2}.{3}", version.Major,
version.Minor, version.Build, version.Revision);
|