# NativeParallelHashMap<TKey, TValue>.ReadOnly

> A read-only alias for the value of a NativeParallelHashMap. Does not have its own allocated storage.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule
* **Implements:** [IEnumerable\<KeyValue\<T, T>>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1), [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.ienumerable)

```csharp
public struct NativeParallelHashMap<TKey, TValue>.ReadOnly : IEnumerable<KeyValue<TKey, TValue>>, IEnumerable
```

## Properties

| Property                                                                                                    | Description                                                         |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| [Capacity](/engine/6000.7/script-reference/unity/collections/nativeparallelhashmap2/readonly/capacity.md)   | The number of key-value pairs that fit in the current allocation.   |
| [IsCreated](/engine/6000.7/script-reference/unity/collections/nativeparallelhashmap2/readonly/iscreated.md) | Whether this hash map has been allocated (and not yet deallocated). |
| [IsEmpty](/engine/6000.7/script-reference/unity/collections/nativeparallelhashmap2/readonly/isempty.md)     | Whether this hash map is empty.                                     |
| [this\[\]](/engine/6000.7/script-reference/unity/collections/nativeparallelhashmap2/readonly/item.md)       | Gets values by key.                                                 |

## Methods

| Method                                                                                                                      | Description                                                                          |
| --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| [ContainsKey](/engine/6000.7/script-reference/unity/collections/nativeparallelhashmap2/readonly/containskey.md)             | Returns true if a given key is present in this hash map.                             |
| [Count](/engine/6000.7/script-reference/unity/collections/nativeparallelhashmap2/readonly/count.md)                         | The current number of key-value pairs in this hash map.                              |
| [GetEnumerator](/engine/6000.7/script-reference/unity/collections/nativeparallelhashmap2/readonly/getenumerator.md)         | Returns an enumerator over the key-value pairs of this hash map.                     |
| [GetKeyArray](/engine/6000.7/script-reference/unity/collections/nativeparallelhashmap2/readonly/getkeyarray.md)             | Returns an array with a copy of all this hash map's keys (in no particular order).   |
| [GetKeyValueArrays](/engine/6000.7/script-reference/unity/collections/nativeparallelhashmap2/readonly/getkeyvaluearrays.md) | Returns a NativeKeyValueArrays with a copy of all this hash map's keys and values.   |
| [GetValueArray](/engine/6000.7/script-reference/unity/collections/nativeparallelhashmap2/readonly/getvaluearray.md)         | Returns an array with a copy of all this hash map's values (in no particular order). |
| [TryGetValue](/engine/6000.7/script-reference/unity/collections/nativeparallelhashmap2/readonly/trygetvalue.md)             | Returns the value associated with a key.                                             |
