# GetValueArray(AllocatorHandle)

> Returns an array with a copy of all the values (in no particular order).

## Definition

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

```csharp
public NativeArray<TValue> GetValueArray(AllocatorManager.AllocatorHandle allocator)
```

### Parameters

**** (\[AllocatorHandle]\(/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle)): The allocator to use.

### Returns

| Type                                                                                 | Description                                                      |
| ------------------------------------------------------------------------------------ | ---------------------------------------------------------------- |
| [NativeArray\<T>](/engine/6000.7/script-reference/unity/collections/nativearray1.md) | An array with a copy of all the values (in no particular order). |

### Remarks

The values are not deduplicated. If you sort the returned array, you can use [NativeParallelHashMapExtensions.Unique](/engine/6000.7/script-reference/unity/collections/nativeparallelhashmapextensions/unique.md) to remove duplicate values.
