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

# isEqualTo

Compares the number with an OSNumber.

```
bool isEqualTo(const OSNumber *aNumber) const;
```

## Parameters

`aNumber`

The OSNumber to compare with.

## Return Value

true iff the two numbers have the same value.

## Discussion

If the passed OSNumber object has the same value, regardless of size, true is returned. 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)