# Class(string)

> Selects all elements with the specified class in the class list, as specified with the class attribute in a UXML file or added with VisualElement.AddToClassList method.

## Definition

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

```csharp
public UQueryBuilder<T> Class(string classname)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The class to use in the query.

### Returns

| Type                                                                                          | Description |
| --------------------------------------------------------------------------------------------- | ----------- |
| [UQueryBuilder\<T>](/engine/6000.0/script-reference/unityengine/uielements/uquerybuilder1.md) |             |

### Remarks

This method can be called multiple times in order to select elements with multiple classes. To select elements by their C# type, use OfType\_1.
