# MarkupParseResult

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

Inherits from `System.ValueType`

## Summary

The result of parsing a line of marked-up text.

```csharp
public struct MarkupParseResult
```

## Remarks

You do not create instances of this struct yourself. It is created by objects that can parse markup, such as [Dialogue](/api/csharp/yarn/yarn.dialogue.md) .

## Constructors

| Name                                                                                                                           | Description                                                                                                             |
| ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| [MarkupParseResult(string,List)](/api/csharp/yarn.markup/yarn.markup.markupparseresult/yarn.markup.markupparseresult..ctor.md) | Initializes a new instance of the [MarkupParseResult](/api/csharp/yarn.markup/yarn.markup.markupparseresult.md) struct. |

## Methods

| Name                                                                                                                                                              | Description                                                                                                                                                                         |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DeleteRange(MarkupAttribute)](/api/csharp/yarn.markup/yarn.markup.markupparseresult/yarn.markup.markupparseresult.deleterange.md)                                | Deletes an attribute from this markup.                                                                                                                                              |
| [TextForAttribute(MarkupAttribute)](/api/csharp/yarn.markup/yarn.markup.markupparseresult/yarn.markup.markupparseresult.textforattribute.md)                      | Returns the substring of [Text](/api/csharp/yarn.markup/yarn.markup.markupparseresult/yarn.markup.markupparseresult.text.md) covered by `attribute` Position and Length properties. |
| [TryGetAttributeWithName(string,MarkupAttribute)](/api/csharp/yarn.markup/yarn.markup.markupparseresult/yarn.markup.markupparseresult.trygetattributewithname.md) | Gets the first attribute with the specified name, if present.                                                                                                                       |

## Properties

| Name                                                                                                            | Description                                                                                                   |
| --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| [Attributes](/api/csharp/yarn.markup/yarn.markup.markupparseresult/yarn.markup.markupparseresult.attributes.md) | The list of [MarkupAttribute](/api/csharp/yarn.markup/yarn.markup.markupattribute.md) s in this parse result. |
| [Text](/api/csharp/yarn.markup/yarn.markup.markupparseresult/yarn.markup.markupparseresult.text.md)             | The original text, with all parsed markers removed.                                                           |

## See Also

* Yarn.Markup.LineParser.ParseString(System.String,System.String,System.Boolean,System.Boolean,System.Boolean):


---

# Agent Instructions: 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.markup/yarn.markup.markupparseresult.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.
