
## Equals (1 of 2) {#equals_1}

Returns a value indicating whether this instance is equal to a specified object.

**Returns:** Returns True if other Duration instance has the same TimeSpan and TimeUnit values as this instance; otherwise, false .

```cpp
Equals(Duration other)
```

| Parameter | Description |
| --- | --- |
| other | The object to compare with this instance. |

---

## Equals (2 of 2) {#equals_2}

Returns a value indicating whether this instance is equal to a specified object.

**Returns:** True if the specified object is a Duration that has the same TimeSpan and TimeUnit values as this instance; otherwise, false .

```cpp
Equals(System::SharedPtr< System::Object > obj)
```

| Parameter | Description |
| --- | --- |
| obj | The object to compare with this instance. |

