# TryGetAttributeValue(string, out string)

> Get the value of an attribute as a string.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.5/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

## TryGetAttributeValue(string, string)

```csharp
bool TryGetAttributeValue(string attributeName, out string value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Attribute name.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The attribute value or null if not found.

### Returns

| Type                                                          | Description                                       |
| ------------------------------------------------------------- | ------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the attribute was found, false otherwise. |
