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

# isEqual(to:)

Returns a Boolean value that indicates whether a given hash table is equal to the receiving hash table.

## Declaration

```swift
func isEqual(to other: NSHashTable<ObjectType>) -> Bool
```

## Parameters

- `other`: The hash table with which to compare the receiving hash table.

## Return Value

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

## Discussion

Discussion Two hash tables have equal contents if they each have the same number of members and if each member of one hash table is present in the other. The equality test used for members depends on the personality option selected. For instance, choosing the objectPersonality option will use isEqual: to determine equality. See NSPointerFunctions.Options for more information on personality options and their corresponding equality tests.

## See Also

### Comparing Hash Tables

- [intersect(_:)](foundation/nshashtable/intersect(_:).md)
- [intersects(_:)](foundation/nshashtable/intersects(_:).md)
- [isSubset(of:)](foundation/nshashtable/issubset(of:).md)
