---
title: "isEqual(to:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsindexset/isequal(to:)"
---

# isEqual(to:)

Indicates whether the indexes in the receiving index set are the same indexes contained in another index set.

## Declaration

```swift
func isEqual(to indexSet: IndexSet) -> Bool
```

## Parameters

- `indexSet`: Index set being inquired about.

## Return Value

Return Value true when the indexes in the receiving index set are the same indexes indexSet contains, false otherwise.
