# ExpressionInterpolatedStringHandler Constructors

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ExpressionInterpolatedStringHandler](/reference/api/csharp/aspire.hosting/expressioninterpolatedstringhandler.md)
- Kind: `Constructors`
- Members: `1`

Represents a handler for interpolated strings that contain expressions. Those expressions will either be literal strings or instances of types that implement both [IValueProvider](/reference/api/csharp/aspire.hosting/ivalueprovider.md) and [IManifestExpressionProvider](/reference/api/csharp/aspire.hosting/imanifestexpressionprovider.md).

## ExpressionInterpolatedStringHandler(int, int)

- Name: `Constructor(int, int)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ReferenceExpression.cs#L326-L329)

Represents a handler for interpolated strings that contain expressions. Those expressions will either be literal strings or instances of types that implement both [IValueProvider](/reference/api/csharp/aspire.hosting/ivalueprovider.md) and [IManifestExpressionProvider](/reference/api/csharp/aspire.hosting/imanifestexpressionprovider.md).

```csharp
public struct ExpressionInterpolatedStringHandler
{
    public ExpressionInterpolatedStringHandler(
        int literalLength,
        int formattedCount)
    {
        // ...
    }
}
```

## Parameters

- `literalLength` (`int`)
  The length of the literal part of the interpolated string.
- `formattedCount` (`int`)
  The number of formatted parts in the interpolated string.
