# ToArray()

> Convert a NativeArray<T> to an array.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.6/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public T[] ToArray()
```

### Returns

| Type              | Description          |
| ----------------- | -------------------- |
| [\<T>\[\]](./.md) | The converted array. |
