# MLStringType

The string type describes string features.

## Creating the Type

```csharp
/// <summary>
/// Create a string feature type.
/// </summary>
/// <param name="length">String length.</param>
/// <param name="name">Feature name.</param>
MLTextType (int length, string name = null);
```

The string type is created with a `length` parameter which specifies the character length of the string. The string type can also be created with a feature `name`.

## Inspecting the Type

```csharp
/// <summary>
/// Feature name.
/// </summary>
string name { get; }

/// <summary>
/// Feature data type.
/// </summary>
Type dataType { get; }
```

Refer to the [`MLFeatureType`](/unity/api/mlfeaturetype.md) class for more information.

{% hint style="info" %}
The `dataType` is always equal to `typeof(string)`.
{% endhint %}

## Inspecting the String

```csharp
/// <summary>
/// Text length.
/// </summary>
int length { get; }
```

The string type reports the `length` of its string feature.


---

# 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.natml.ai/unity/api/mlfeaturetype/mlstringtype.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.
