4AspNet POP3 .NET Component

License.LicenseKey Property

Sets the license key to use with product.

[Visual Basic]
Public Shared Property LicenseKey As String
[C#]
public static string LicenseKey {set;}

Remarks

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 POP3 class; otherwise the exception of type LicenseException will be thrown.

Example

The following example initializes a LicenseKey property and retrieve all information about license.

using System;
using ForAspNet.POP3;

namespace Test
{
    class Class1
    {
        [STAThread]
        static void Main(string[] args)
        {
            ForAspNet.POP3.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);
        }
    }
}

See Also

License Class | ForAspNet.POP3 Namespace