Прочетете на английски Редактиране

Споделяне чрез


ActivationContext.Identity Property

Definition

Gets the application identity for the current application.

C#
public ApplicationIdentity Identity { get; }

Property Value

An ApplicationIdentity object that identifies the current application.

Examples

The following code example demonstrates the use of an ActivationContext object to obtain the ApplicationIdentity for a manifest-based application. This code example is part of a larger example provided for the ActivationContext class.

C#
ActivationContext ac = AppDomain.CurrentDomain.ActivationContext;
ApplicationIdentity ai = ac.Identity;

Remarks

An ApplicationIdentity uniquely identifies an application by its full name and location.

Applies to

Продукт Версии
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1