Skip to content

Instantly share code, notes, and snippets.

@constructor-igor
Created November 10, 2013 11:30
Show Gist options
  • Save constructor-igor/7397076 to your computer and use it in GitHub Desktop.
Save constructor-igor/7397076 to your computer and use it in GitHub Desktop.
how to get executable version
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