Created
November 10, 2013 11:30
-
-
Save constructor-igor/7397076 to your computer and use it in GitHub Desktop.
how to get executable version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string Version | |
{ | |
get | |
{ | |
Assembly asm = Assembly.GetExecutingAssembly(); | |
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(asm.Location); | |
return String.Format("{0}.{1}.{2}.{3}", fvi.ProductMajorPart, fvi.ProductMinorPart, fvi.ProductBuildPart, fvi.ProductPrivatePart); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment