# ToList

> Convenience method. shorthand for Build().ToList.

## Definition

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

## ToList()

Convenience method. shorthand for Build().ToList.

```csharp
public List<T> ToList()
```

### Returns

| Type                                                                                 | Description                                            |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------ |
| [List\<T>](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1) | A list containing elements satisfying selection rules. |

## ToList(List\<T>)

Convenience method. Shorthand gor Build().ToList().

```csharp
public void ToList(List<T> results)
```

### Parameters

**** (\[List\<T>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): Adds all elements satisfying selection rules to the list.
