# Line

Struct in [Yarn](https://docs.yarnspinner.dev/2.2/api/csharp/yarn)

Inherits from `System.ValueType`

## Summary

A line of dialogue, sent from the [Dialogue](https://docs.yarnspinner.dev/2.2/api/csharp/yarn/yarn.dialogue) to the game.

```csharp
public struct Line
```

## Remarks

When the game receives a [Line](https://docs.yarnspinner.dev/2.2/api/csharp/yarn/yarn.line), it should do the following things to prepare the line for presentation to the user.

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

You do not create instances of this struct yourself. They are created by the [Dialogue](https://docs.yarnspinner.dev/2.2/api/csharp/yarn/yarn.dialogue) during program execution.

## Fields

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

## See Also

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