Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Evaluation Only. Created with Aspose. Copyright 2003-2020 Aspose Pty Ltd, At most 4 elements (for any collection) can be viewed in evaluation mode, This document was truncated here because it was created using Aspose API in Evaluation Mode
Aspose.Words.License license = new Aspose.Words.License();
// This line attempts to set a license from several locations relative to the executable and Aspose.Words.dll.
// You can also use the additional overload to load a license from a stream, this is useful for instance when the
// license is stored as an embedded resource
try
{
license.SetLicense("Aspose.Words.lic");
Console.WriteLine("License set successfully.");
}
catch (Exception e)
{
// We do not ship any license with this example, visit the Aspose site to obtain either a temporary or permanent license.
Console.WriteLine("\nThere was an error setting the license: " + e.Message);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment