Dela via


Package.Current Property

Definition

Gets the package for the current app.

public:
 static property Package ^ Current { Package ^ get(); };
static Package Current();
public static Package Current { get; }
var package = Package.current;
Public Shared ReadOnly Property Current As Package

Property Value

The package.

Remarks

Important

Although the Package class is supported in an unpackaged process (that is, a process belonging to an app that lacks package identity), the Package.Current property is supported only in a packaged process (that is, a process belonging to an app that has package identity). To access a package object from an unpackaged process, use Windows.Management.Deployment.PackageManager. And for more info about packaging, see Package a desktop or UWP app in Visual Studio.

Applies to

See also