# AsReadOnly()

> Returns a readonly version of this UnsafeHashMap instance.

## Definition

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

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

### Returns

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

### Remarks

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