<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLStructMember/dataType",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLStructMember(py)dataType"
  },
  "title" : "dataType"
}
-->

# dataType

The data type of the struct member.

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

## Discussion

For information on possible values, see [`MTLDataType`](/documentation/Metal/MTLDataType). If the value is [`MTLDataType.array`](/documentation/Metal/MTLDataType/array), then the [`arrayType()`](/documentation/Metal/MTLStructMember/arrayType()) method returns an object that describes the underlying array. If the value is [`MTLDataType.struct`](/documentation/Metal/MTLDataType/struct), then the [`structType()`](/documentation/Metal/MTLStructMember/structType()) method returns an object that describes the underlying struct.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)