# TryGetProperty(string,string?)

Method in [MarkupAttribute](https://docs.yarnspinner.dev/api/csharp/yarn.markup/yarn.markup.markupattribute)

## Summary

Gets a string property named `name` from this attribute, if present.

```csharp
public readonly bool TryGetProperty(string name, [NotNullWhen(true)] out string? result)
```

## Parameters

| Name            | Description                                                 |
| --------------- | ----------------------------------------------------------- |
| `string` name   | The name of the property.                                   |
| `string` result | On return, the property's value if found, or `null` if not. |

## Returns

`true` if a property named `name` was found; `false` otherwise.


---

# 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.markupattribute/yarn.markup.markupattribute.trygetproperty-4.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.
