# GetClassNames()

> Retrieve the classes for this element.

## Definition

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

```csharp
public IEnumerable<UniqueStyleString> GetClassNames()
```

### Returns

| Type                                                                                                               | Description   |
| ------------------------------------------------------------------------------------------------------------------ | ------------- |
| [IEnumerable\<UniqueStyleString>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1) | A class list. |

### Remarks

The order of the classes will always be the same between two elements that have the same classes. The returned classes are ordered by corresponding UniqueStyleString id. This implies that for a given element the order is not guaranteed to match between executions or after a domain reload, depending on the creation order of the UniqueStyleStrings involved.
