---
title: "NSCompareHashTables(_:_:)"
framework: foundation
role: symbol
role_heading: Function
path: "foundation/nscomparehashtables(_:_:)"
---

# NSCompareHashTables(_:_:)

Returns a Boolean value that indicates whether the elements of two hash tables are equal.

## Declaration

```swift
func NSCompareHashTables(_ table1: NSHashTable<AnyObject>, _ table2: NSHashTable<AnyObject>) -> Bool
```

## Return Value

Return Value true if the two hash tables are equal—that is, if each element of table1 is in table2 and the two tables are the same size, otherwise false.

## See Also

### Related Documentation

- [NSCreateHashTable(_:_:)](foundation/nscreatehashtable(_:_:).md)
- [NSCreateHashTableWithZone(_:_:_:)](foundation/nscreatehashtablewithzone(_:_:_:).md)

### Functions

- [NSAllHashTableObjects(_:)](foundation/nsallhashtableobjects(_:).md)
- [NSCopyHashTableWithZone(_:_:)](foundation/nscopyhashtablewithzone(_:_:).md)
- [NSCountHashTable(_:)](foundation/nscounthashtable(_:).md)
- [NSCreateHashTable(_:_:)](foundation/nscreatehashtable(_:_:).md)
- [NSCreateHashTableWithZone(_:_:_:)](foundation/nscreatehashtablewithzone(_:_:_:).md)
- [NSEndHashTableEnumeration(_:)](foundation/nsendhashtableenumeration(_:).md)
- [NSEnumerateHashTable(_:)](foundation/nsenumeratehashtable(_:).md)
- [NSFreeHashTable(_:)](foundation/nsfreehashtable(_:).md)
- [NSHashGet(_:_:)](foundation/nshashget(_:_:).md)
- [NSHashInsert(_:_:)](foundation/nshashinsert(_:_:).md)
- [NSHashInsertIfAbsent(_:_:)](foundation/nshashinsertifabsent(_:_:).md)
- [NSHashInsertKnownAbsent(_:_:)](foundation/nshashinsertknownabsent(_:_:).md)
- [NSHashRemove(_:_:)](foundation/nshashremove(_:_:).md)
- [NSNextHashEnumeratorItem(_:)](foundation/nsnexthashenumeratoritem(_:).md)
- [NSResetHashTable(_:)](foundation/nsresethashtable(_:).md)
