Sets the license key to use with product.
The property is write-only, i.e. it is possible to assign a value but no to retrieve it.
Note The LicenseKey should be initialized in code before first use of Parole class; otherwise the exception of type LicenseException will be thrown.
The following example initializes a LicenseKey property and retrieve all information about license.
using System;
using ForAspNet.Parole;
namespace Test
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
License.LicenseKey = "<put license string here>";
string features = "";
foreach(int i in License.Features)
features += i.ToString() + " ";
Console.WriteLine("Subject:\t{0}\nFeatures:\t{1}\nExpireDate\t{2:d}\nIsTrial\t{3}",
License.Subject, features, License.ExpireDate, License.IsTrial);
}
}
}
License Class | ForAspNet.Parole Namespace