# GetArrayLength(nint)

> Returns the number of elements in the array.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/7000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.AndroidJNIModule

## GetArrayLength(IntPtr)

```csharp
public static int GetArrayLength(nint array)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The Java array whose length is returned.

### Returns

| Type                                                       | Description                          |
| ---------------------------------------------------------- | ------------------------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of elements in the array. |

### Remarks

Additional Resources: [Java Native Interface Specification (Oracle)](http://download.oracle.com/javase/1.5.0/docs/guide/jni/spec/jniTOC.html)
