# MarkdownString Constructors

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

Represents a string that contains Markdown-formatted content.

## MarkdownString(string)

- Name: `Constructor(string)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Pipelines/MarkdownString.cs#L35-L39)

Initializes a new instance of the [MarkdownString](/reference/api/csharp/aspire.hosting/markdownstring.md) class with the specified Markdown content.

```csharp
public sealed class MarkdownString
{
    public MarkdownString(
        string value)
    {
        // ...
    }
}
```

## Parameters

- `value` (`string`)
  The Markdown-formatted string value.

## Exceptions

- `ArgumentNullException` -- Thrown when `value` is `null`.
