# 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`](https://docs.natml.ai/unity/api/mlfeaturetype) 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.
