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

# isEqual(to:)

Compares the receiving ordered set to another ordered set.

## Declaration

```swift
func isEqual(to other: NSOrderedSet) -> Bool
```

## Parameters

- `other`: The ordered set with which to compare the receiving ordered set.

## Return Value

Return Value true if the contents of other are equal to the contents of the receiving ordered set, otherwise false.

## Discussion

Discussion Two ordered sets have equal contents if they each have the same number of members, if each member of one ordered set is present in the other, and the members are in the same order.

## See Also

### Related Documentation

- [isEqual(_:)](objectivec/nsobjectprotocol/isequal(_:).md)

### Comparing Sets

- [intersects(_:)](foundation/nsorderedset/intersects(_:).md)
- [intersectsSet(_:)](foundation/nsorderedset/intersectsset(_:).md)
- [isSubset(of:)](foundation/nsorderedset/issubset(of:)-7brc.md)
- [isSubset(of:)](foundation/nsorderedset/issubset(of:)-8zx9x.md)
