## Equals(object) {#equals_1}

Tests whether obj is a Rectangle structure with the same location and size of this Rectangle structure.

```csharp
public override bool Equals(object obj)
```

| Parameter | Type | Description |
| --- | --- | --- |
| obj | Object | The Object to test. |

### Return Value

This method returns `true` if obj is a Rectangle structure and its X, Y, Width, and Height properties are equal to the corresponding properties of this Rectangle structure; otherwise, `false`.

### See Also

* struct [Rectangle](../)
* namespace [Aspose.Drawing](../../rectangle/)
* assembly [Aspose.Drawing.Common](../../../)

---

## Equals(Rectangle) {#equals}

Tests whether other [`Rectangle`](../) structure has the same location and size of this [`Rectangle`](../) structure.

```csharp
public bool Equals(Rectangle other)
```

| Parameter | Type | Description |
| --- | --- | --- |
| other | Rectangle | Other rectangle to test |

### Return Value

This method returns `true` if other [`Rectangle`](../) structure and its X, Y, Width, and Height properties are equal to the corresponding properties of this [`Rectangle`](../) structure; otherwise, `false`.

### See Also

* struct [Rectangle](../)
* namespace [Aspose.Drawing](../../rectangle/)
* assembly [Aspose.Drawing.Common](../../../)


