Inequality Operator
Collapse the table of content
Expand the table of content

Rect.Inequality Operator

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Compares two Rect structures for inequality.

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

public static bool operator !=(
	Rect rect1,
	Rect rect2
)

Parameters

rect1
Type: System.Windows.Rect
The first rectangle to compare.
rect2
Type: System.Windows.Rect
The second rectangle to compare.

Return Value

Type: System.Boolean
true if the Rect structures do not have the same x,y,width,height property values; otherwise, false.

In this comparison, two instances with all properties of Double.NaN are considered equal.

NoteNote:

A rectangle's position and dimensions are described by Double values. Because Double values can lose precision when operated upon, a comparison between two values that are logically equal might fail.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft