Size.Equals Method (Size, Size)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Compares two instances of Size for equality.

Namespace:   System.Windows
Assembly:  WindowsBase (in WindowsBase.dll)

public static bool Equals(
	Size size1,
	Size size2


Type: System.Windows.Size

The first instance of Size to compare.

Type: System.Windows.Size

The second instance of Size to compare.

Return Value

Type: System.Boolean

true if the instances of Size are equal; otherwise, false.

Double values can result in an error when operated upon. Values that are logically equal might fail to result in a value of true.

.NET Framework
Available since 3.0
Return to top