PackageVersion PackageVersion PackageVersion PackageVersion Struct

Represents the package version info.

Syntax

Declaration

public struct PackageVersionpublic struct PackageVersionPublic Structure PackageVersionpublic struct PackageVersion

Remarks

Examples

Use the Current property to get the package for the current app. Use the 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 summary

The build version number of the package.

The major version number of the package.

The minor version number of the package.

The revision version number of the package.

Fields

  • Build
    Build
    Build
    Build

    The build version number of the package.

    public field ushort Buildpublic field ushort BuildPublic Field Buildpublic field ushort Build
  • Major
    Major
    Major
    Major

    The major version number of the package.

    public field ushort Majorpublic field ushort MajorPublic Field Majorpublic field ushort Major
  • Minor
    Minor
    Minor
    Minor

    The minor version number of the package.

    public field ushort Minorpublic field ushort MinorPublic Field Minorpublic field ushort Minor
  • Revision
    Revision
    Revision
    Revision

    The revision version number of the package.

    public field ushort Revisionpublic field ushort RevisionPublic Field Revisionpublic field ushort Revision

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.ApplicationModel.dll