# How to read product properties from a license file

When a license file is generated on the server, it embeds Product Properties associated with the license.

The code below shows how to extract the Product Properties from the license file.

Assuming lv is an instance of a LicenseValidator class, and that the license is bound to the computer name:

{% code overflow="wrap" %}

```csharp
string licenseFileXml;
string computerID = Environment.MachineName;

if (lv.QlmLicenseObject.GetLicenseFile(string.Empty, lv.ActivationKey, string.Empty, 
                                        computerID, out licenseFileXml))
{
        ILicenseInfo li = new LicenseInfo();
        
        // Parse the xml and populate the LicenseInfo object
        li.LoadLicenseXml(licenseFileXml, computerID);

        QlmProductProperties pps = new QlmProductProperties();
        pps.Deserialize(li.ProductProperties);

        foreach (QlmProductProperty pp in pps.Properties)
        {
             Console.WriteLine(String.Format("Property: {0}, Value: {1}", 
                                pp.ToString(), pp.PropValue));
        }
}
```

{% endcode %}


---

# 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/how-to/how-to-read-product-properties-from-a-license-file.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.
