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

# Line

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

Inherits from `System.ValueType`

## Summary

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

```csharp
public struct Line
```

## Remarks

When the game receives a [Line](/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](/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>)](/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](/api/csharp/yarn/yarn.dialogue.md) during program execution.

## Constructors

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

## Properties

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yarnspinner.dev/api/csharp/yarn/yarn.line.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
