# AsReadOnly()

> Returns a readonly version of this NativeParallelHashMap instance.

## Definition

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

```csharp
public NativeParallelHashMap<TKey, TValue>.ReadOnly AsReadOnly()
```

### Returns

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

### Remarks

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