Get app title and version info

November 9, 2016 ยท View on GitHub

Gets the title and version of an app as specified in the project manifest.

using Windows.ApplicationModel;

public static string AppName
{
    get { return Package.Current.Id.Name; }
}

public static string AppVersion
{
    get
    {
        PackageVersion version = Package.Current.Id.Version;
        return $"{version.Major}.{version.Minor}.{version.Build}.{version.Revision}";
    }
}

See also

Package class
Interpolated strings (strings with a $ prefix)