---
title: isEqualTo
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/osdata/isequalto-2kdml
---

# isEqualTo

Compares the data with an OSData

## Declaration

```occ
bool isEqualTo(const OSData *aDataObj) const;
```

## Parameters

- `aDataObj`: The OSData to compare with.

## Return Value

Return Value True iff the object is of class OSArray and isEqualTo(const OSArray * anArray) returns true.

## Discussion

Discussion If the passed OSData object has the same length and all bytes are identical, true is returned. Otherwise false is returned.

## See Also

### Comparing Data Objects

- [isEqualTo](driverkit/osdata/isequalto-4xz0j.md)
- [isEqualTo](driverkit/osdata/isequalto-5ssf5.md)
- [isEqualTo](driverkit/osdata/isequalto-79gqy.md)
