# Resize(int, NativeArrayOptions)

> Sets the length, expanding the capacity if necessary.

## Definition

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

```csharp
public void Resize(int numBits, NativeArrayOptions options = NativeArrayOptions.UninitializedMemory)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The new length in bits.**** (\[NativeArrayOptions]\(/engine/6000.7/script-reference/unity/collections/nativearrayoptions)): Whether newly allocated data should be zeroed out.
