Skip to content

Instantly share code, notes, and snippets.

@mrjamiebowman
Created March 28, 2020 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrjamiebowman/4a0e14d457814d32142f788e19ccf7e8 to your computer and use it in GitHub Desktop.
Save mrjamiebowman/4a0e14d457814d32142f788e19ccf7e8 to your computer and use it in GitHub Desktop.
Application Info Helper (Returns Application Name, Version using C# Reflection)
public static class ApplicationInfoHelper
{
public static string ApplicationName
{
get {
var name = (((System.Reflection.Assembly.GetExecutingAssembly().FullName).Split()))[0]);
return item.Substring(0, name.length - 1);
}
}
public static string ApplicationVersion
{
get {
var version = (((System.Reflection.Assembly.GetExecutingAssembly().FullName).Split())[1]);
return version.Substring(0, item.length - 1);
}
}
public static string ApplicationNameAndVersion => "${ApplicationName} ({ApplicationVersion})";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment