> 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/3.1/api/csharp/yarn/yarn.line.md).

# Line

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

Inherits from `System.ValueType`

## Summary

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

```csharp
public struct Line
```

## Remarks

When the game receives a [Line](/3.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](/3.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>)](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.expandsubstitutions.md) to replace all substitutions in the user-facing text.
3. Use `Yarn.Markup.LineParser.ParseString(System.String,System.String,System.Boolean,System.Boolean,System.Boolean)` to parse all markup in the line.

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

## Constructors

| Name                                                                         | Description                                                                         |
| ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [Line(string,string\[\])](/3.1/api/csharp/yarn/yarn.line/yarn.line..ctor.md) | Initialises a new instance of the [Line](/3.1/api/csharp/yarn/yarn.line.md) struct. |

## Properties

| Name                                                                       | Description                                                                   |
| -------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [ID](/3.1/api/csharp/yarn/yarn.line/yarn.line.id.md)                       | The string ID for this line.                                                  |
| [Substitutions](/3.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](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.linehandler.md): Gets or sets the [LineHandler](/3.1/api/csharp/yarn/yarn.linehandler.md) that is called when a line is ready to be shown to the user.
