# NativeParallelHashSet(int, AllocatorHandle)

> Initializes and returns an instance of NativeParallelHashSet.

## Definition

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

```csharp
public NativeParallelHashSet(int capacity, AllocatorManager.AllocatorHandle allocator)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of values that should fit in the initial allocation.**** (\[AllocatorHandle]\(/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle)): The allocator to use.
