LicenseSetLicense Method (String)
Licenses the component.

Namespace: GroupDocs.Viewer
Assembly: GroupDocs.Viewer (in GroupDocs.Viewer.dll) Version: 21.9
Syntax
public void SetLicense(
	string licensePath
)

Parameters

licensePath
Type: SystemString
The license file path.
Exceptions
ExceptionCondition
ArgumentExceptionThrown when licensePath is null or empty string.
Examples
The following example demonstrates how to set a license passing a path to the license file.
C#
string licensePath = "GroupDocs.Viewer.lic";
License license = new License();
license.SetLicense(licensePath);
See Also