---
title: section
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsindexpath/section
---

# section

An index number identifying a section in a table view or collection view.

## Declaration

```swift
var section: Int { get }
```

## See Also

### Using Special Node Names

- [init(forRow:inSection:)](foundation/nsindexpath/init(forrow:insection:).md)
- [init(forItem:inSection:)](foundation/nsindexpath/init(foritem:insection:).md)
- [row](foundation/nsindexpath/row.md)
- [item](foundation/nsindexpath/item.md)
