|
DailyCoding > Windows
|
How to get current assembly version
|
| Extracting the version of currently executing assembly |
|
Author
admin on
May 21, 2008 |
0 Comments
|
| Rate it |
|
(Rated
0
by
0
people)
|
 |
Loading.. |
|
920 Views
|
|
|
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);
|
|
Assembly
|
C#
|
|
|
|
|
|
|
Leave a Comment
|
 |
Loading.. |
|
|
|
|
|