---
title: "subscript(_:)"
framework: modelio
role: symbol
role_heading: Instance Subscript
path: "modelio/mdlmaterial/subscript(_:)-19j2"
---

# subscript(_:)

Returns the material property at the specified index in the material, for use with subscript syntax.

## Declaration

```swift
subscript(idx: Int) -> MDLMaterialProperty? { get }
```

## Parameters

- `idx`: An index in the material’s list of material properties; must be less than the value of doc://com.apple.modelio/documentation/ModelIO/MDLMaterial/count.

## Return Value

Return Value The material property at the specified index.

## Discussion

Discussion The ordering of material properties in a material is arbitrary, but you can use this method (together with the count property) to iterate through the material’s complete list of material properties. You can also iterate through material properties using Fast Enumeration.

## See Also

### Accessing material properties with subscript syntax

- [subscript(_:)](modelio/mdlmaterial/subscript(_:)-323j3.md)
- [count](modelio/mdlmaterial/count.md)
