# AsReadOnly()

> Returns a readonly version of this NativeParallelHashSet instance.

## Definition

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

```csharp
public NativeParallelHashSet<T>.ReadOnly AsReadOnly()
```

### Returns

| Type                                                                                             | Description                 |
| ------------------------------------------------------------------------------------------------ | --------------------------- |
| [ReadOnly](/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1/readonly.md) | ReadOnly instance for this. |

### Remarks

ReadOnly containers point to the same underlying data as the NativeParallelHashSet it is made from.
