# GetSubArray(int, int)

> Gets a view into an array starting at the specified index.

## Definition

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

```csharp
public NativeArray<T> GetSubArray(int start, int length)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The start index of the sub array.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The length of the sub array.

### Returns

| Type                                                                                 | Description                                                                     |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- |
| [NativeArray\<T>](/engine/6000.6/script-reference/unity/collections/nativearray1.md) | A view into the array that aliases the original array, which can't be disposed. |
