License class

Provides methods to license the component.

public class License


Name Description
License() Initializes a new instance of this class.


Name Description
SetLicense(Stream) Licenses the component.
SetLicense(string) Licenses the component.


Shows how initialize a license for Aspose.Words using a license file in the local file system.

// Set the license for our Aspose.Words product by passing the local file system filename of a valid license file.
string licenseFileName = Path.Combine(LicenseDir, "Aspose.Words.NET.lic");

License license = new License();

// Create a copy of our license file in the binaries folder of our application.
string licenseCopyFileName = Path.Combine(AssemblyDir, "Aspose.Words.NET.lic");
File.Copy(licenseFileName, licenseCopyFileName);

// If we pass a file's name without a path,
// the SetLicense will search several local file system locations for this file.
// One of those locations will be the "bin" folder, which contains a copy of our license file.

See Also