---
title: element()
framework: metal
role: symbol
role_heading: Instance Method
path: metal/mtlarraytype/element()
---

# element()

Provides a description of the underlying type when an array holds other arrays as its elements.

## Declaration

```swift
func element() -> MTLArrayType?
```

## Return Value

Return Value Returns an object that describes an array. If the array elements aren’t arrays, this method returns nil.

## Discussion

Discussion Use this method if elementType is MTLDataType.array.

## See Also

### Obtaining details for complex array elements

- [elementStructType()](metal/mtlarraytype/elementstructtype().md)
- [elementPointerType()](metal/mtlarraytype/elementpointertype().md)
- [elementTextureReferenceType()](metal/mtlarraytype/elementtexturereferencetype().md)
