---
title: dataType
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlstructmember/datatype
---

# dataType

The data type of the struct member.

## Declaration

```swift
var dataType: MTLDataType { get }
```

## Discussion

Discussion For information on possible values, see MTLDataType. If the value is MTLDataType.array, then the arrayType() method returns an object that describes the underlying array. If the value is MTLDataType.struct, then the structType() method returns an object that describes the underlying struct.

## See Also

### Describing the struct member

- [name](metal/mtlstructmember/name.md)
- [offset](metal/mtlstructmember/offset.md)
- [argumentIndex](metal/mtlstructmember/argumentindex.md)
