<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/OSArray/isEqualTo-5w7om",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@OSArray@F@isEqualTo#*1$@S@OSArray#1"
  },
  "title" : "isEqualTo"
}
-->

# isEqualTo

Compares all members of two arrays with isEqualTo().

```
bool isEqualTo(const OSArray *anArray) const;
```

## Parameters

`anArray`

The other array to compare with.

## Return Value

true if both arrays have equal counts and all members compare successfully with isEqualTo.

## Discussion

If the arrays have equal counts, each member is compared with the other at the same index with isEqualTo(). Otherwise false is returned.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)