---
title: isEqualTo
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/osdata/isequalto-4xz0j
---

# isEqualTo

Compares the data with an OSObject

## Declaration

```occ
virtual bool isEqualTo(const OSMetaClassBase *anObject) const;
```

## Parameters

- `anObject`: The object to compare with.

## Return Value

Return Value True iff the object is of class OSData or OSString and isEqualTo() returns true.

## Discussion

Discussion If the object is of class OSData, the result of isEqualTo(const OSData * aDataObj) is returned. If the object is of class OSString, the result of OSString::isEqualTo(const OSData * aDataObj) is returned. Otherwise false is returned.

## See Also

### Comparing Data Objects

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