Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 709 Bytes

App-version-and-title.md

File metadata and controls

32 lines (24 loc) · 709 Bytes

Get app title and version info

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)