# Descendents

> Selects all elements that are descendants of currently matching ancestors.

## Definition

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

## Descendents\<T>(string, string\[])

Selects all elements that are descendants of currently matching ancestors.

```csharp
public UQueryBuilder<T2> Descendents<T2>(string name = null, params string[] classNames) where T2 : VisualElement
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[string\[]]\(https\://learn.microsoft.com/dotnet/api/system.string)):&#x20;

### Returns

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

## Descendents\<T>(string, string)

Selects all elements that are descendants of currently matching ancestors.

```csharp
public UQueryBuilder<T2> Descendents<T2>(string name = null, string classname = null) where T2 : VisualElement
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)):&#x20;

### Returns

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