In This Article

SizeExtensions Class

Provides extension methods for the type System.Windows.Size.

public static class SizeExtensions
Inheritance:
object object

Methods

IsEffectivelyEqual(Size, Size)

Determines whether the two values are close enough to be considered equal.

public static bool IsEffectivelyEqual(this Size left, Size right)
Parameter Type Description
left Size

The value on the left side of the comparison.

right Size

The value on the left side of the comparison.

Returns

bool:

true if the two values are close enough to be considered equal; otherwise, false.

IsWithin(Size, Size, double)

Determines whether the two values are within a specified range.

public static bool IsWithin(this Size left, Size right, double difference)
Parameter Type Description
left Size

The value on the left side of the comparison.

right Size

The value on the left side of the comparison.

difference double

The difference threshold.

Returns

bool:

true if the two values within a specified range; otherwise, false.

Inherited Members