# UnsafeHashSet<T>.ReadOnly

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

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Collections.LowLevel.Unsafe](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.ManagedKernelModule
* **Implements:** [IEnumerable\<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 UnsafeHashSet<T>.ReadOnly : IEnumerable<T>, IEnumerable
```

## Properties

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

## Methods

| Method                                                                                                                      | Description                                                                 |
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| [Contains](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafehashset1/readonly/contains.md)           | Returns true if a particular value is present.                              |
| [GetEnumerator](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafehashset1/readonly/getenumerator.md) | Returns an enumerator over the key-value pairs of this hash map.            |
| [ToNativeArray](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafehashset1/readonly/tonativearray.md) | Returns an array with a copy of this set's values (in no particular order). |
