Package​Version Package​Version Package​Version Package​Version Struct

Definition

Represents the package version info.

public : struct PackageVersionpublic struct PackageVersionPublic Structure PackageVersion// You can use this struct in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Examples

Use the Package.Current | current property to get the package for the current app. Use the Package.Id | id property to get the package ID, from wihch you can then get the version.

var package = Windows.ApplicationModel.Package.current;
var packageId = package.id;
var version = packageId.version;

using Windows.ApplicationModel;

Package package = Package.Current;
PackageId packageId = package.Id;
PackageVersion version = packageId.Version;
Dim package As Windows.ApplicationModel.Package = Windows.ApplicationModel.Package.Current
Dim packageId As Windows.ApplicationModel.PackageId = package.Id
Dim version As Windows.ApplicationModel.PackageVersion = packageId.Version
Windows::ApplicationModel::Package^ package = Windows::ApplicationModel::Package::Current;
Windows::ApplicationModel::PackageId^ packageId = package->Id;
Windows::ApplicationModel::PackageVersion version = packageId->Version;

Fields

Build Build Build Build

The build version number of the package.

public : field ushort Buildpublic field ushort BuildPublic Field Build// You can use this field in JavaScript.

Major Major Major Major

The major version number of the package.

public : field ushort Majorpublic field ushort MajorPublic Field Major// You can use this field in JavaScript.

Minor Minor Minor Minor

The minor version number of the package.

public : field ushort Minorpublic field ushort MinorPublic Field Minor// You can use this field in JavaScript.

Revision Revision Revision Revision

The revision version number of the package.

public : field ushort Revisionpublic field ushort RevisionPublic Field Revision// You can use this field in JavaScript.