LicenseInformation.IsTrial Property

Definition

Gets a value that indicates whether the license is a trial license.

public:
 property bool IsTrial { bool get(); };
bool IsTrial();
public bool IsTrial { get; }
var boolean = licenseInformation.isTrial;
Public ReadOnly Property IsTrial As Boolean

Property Value

Boolean

bool

Returns true if the license is a trial license, and otherwise false.

Remarks

For a trial experience with a trial period, there are some special considerations for interpreting the value of IsTrial. IsTrial returns true even after the trial period ends, because a trial license is logically considered to be a trial license both during and after the trial period. After purchase, when the license becomes full, IsTrial returns false. While IsTrial returns true, there are two ways to tell whether the trial period has expired. If you want to take action the moment the trial period expires then compare the current Coordinated Universal Time (or Zulu time) with ExpirationDate. Otherwise, you can check IsActive, which returns true during the trial period and false some time after the trial period ends.

Note

Be aware that, for an app installed from the Microsoft Store, it can take some hours after the trial period ends for IsActive to begin returning a value of false. When testing your app with CurrentAppSimulator, IsActive will return false at the exact datetime set in the configuration file.

Applies to