> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/2.1/api/csharp/yarn/yarn.line.md).

# Line

Struct in [Yarn](/2.1/api/csharp/yarn.md)

Inherits from `System.ValueType`

## Summary

A line of dialogue, sent from the [Dialogue](/2.1/api/csharp/yarn/yarn.dialogue.md) to the game.

```csharp
public struct Line
```

## Remarks

When the game receives a [Line](/2.1/api/csharp/yarn/yarn.line.md), it should do the following things to prepare the line for presentation to the user.

1. Use the value in the [ID](/2.1/api/csharp/yarn/yarn.line/yarn.line.id.md) field to look up the appropriate user-facing text in the string table.
2. Use [ExpandSubstitutions(string,IList\<string>)](/2.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.expandsubstitutions.md) to replace all substitutions in the user-facing text.
3. Use [ParseMarkup(string)](/2.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.parsemarkup.md) to parse all markup in the line.

You do not create instances of this struct yourself. They are created by the [Dialogue](/2.1/api/csharp/yarn/yarn.dialogue.md) during program execution.

## Fields

| Name                                                                       | Description                                                                   |
| -------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [ID](/2.1/api/csharp/yarn/yarn.line/yarn.line.id.md)                       | The string ID for this line.                                                  |
| [Substitutions](/2.1/api/csharp/yarn/yarn.line/yarn.line.substitutions.md) | The values that should be inserted into the user-facing text before delivery. |

## See Also

* [Dialogue.LineHandler](/2.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.linehandler.md): Gets or sets the [LineHandler](/2.1/api/csharp/yarn/yarn.linehandler.md) that is called when a line is ready to be shown to the user.
