# CreateLicenseKey

### Description

Creates a non-computer-bound license key.

```csharp
string CreateLicenseKey (System.DateTime expiryDate, int expiryDuration)
```

### Arguments

| Name           | Data Type | Description                                                                                                     |
| -------------- | :-------: | --------------------------------------------------------------------------------------------------------------- |
| expiryDate     |  DateTime | The date when the license will expire. Use DateTime.MinValue if you do not want to specify an expiry date.      |
| expiryDuration |    int    | The duration of the evaluation/subscription period is in days. Use -1 if you do not want to specify a duration. |

### Return

| Type   | Description                        |
| ------ | ---------------------------------- |
| string | the deactivation verification code |

## Remarks

If the expiryDate is NULL and the ExpiryDuration is -1, the license key is a permanent non-evaluation license key.

Prior to calling this function, you must call DefineProduct and set the PrivateKey property. Note that including the PrivateKey in your code is not recommended. Creation of license keys should never be done from within the application but rather from a server that the user does not have access to.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.soraco.co/docs/api-reference/.net-api/qlmlicense/client-side-methods/createlicensekey.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
