# NativeBitArray.ReadOnly

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

## Definition

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

```csharp
public struct NativeBitArray.ReadOnly
```

## Properties

| Property                                                                                            | Description                                                      |
| --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| [IsCreated](/engine/6000.7/script-reference/unity/collections/nativebitarray/readonly/iscreated.md) | Whether this array has been allocated (and not yet deallocated). |
| [IsEmpty](/engine/6000.7/script-reference/unity/collections/nativebitarray/readonly/isempty.md)     | Whether the container is empty.                                  |
| [Length](/engine/6000.7/script-reference/unity/collections/nativebitarray/readonly/length.md)       | Returns the number of bits.                                      |

## Methods

| Method                                                                                              | Description                                                                             |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| [CountBits](/engine/6000.7/script-reference/unity/collections/nativebitarray/readonly/countbits.md) | Returns the number of bits in a range that are 1.                                       |
| [Find](/engine/6000.7/script-reference/unity/collections/nativebitarray/readonly/find.md)           | Finds the first length-"N" contiguous sequence of 0 bits in this bit array.             |
| [GetBits](/engine/6000.7/script-reference/unity/collections/nativebitarray/readonly/getbits.md)     | Returns a ulong which has bits copied from this array.                                  |
| [IsSet](/engine/6000.7/script-reference/unity/collections/nativebitarray/readonly/isset.md)         | Returns true if the bit at an index is 1.                                               |
| [TestAll](/engine/6000.7/script-reference/unity/collections/nativebitarray/readonly/testall.md)     | Returns true if all of the bits in a range are 1.                                       |
| [TestAny](/engine/6000.7/script-reference/unity/collections/nativebitarray/readonly/testany.md)     | Returns true if at least one of the bits in a range is 1.                               |
| [TestNone](/engine/6000.7/script-reference/unity/collections/nativebitarray/readonly/testnone.md)   | Returns true if none of the bits in a range are 1 ("i.e." all bits in the range are 0). |
