# Point.Inequality(Point, Point) 运算符

## 定义

``````public:
static bool operator !=(System::Windows::Point point1, System::Windows::Point point2);``````
``public static bool operator != (System.Windows.Point point1, System.Windows.Point point2);``
``static member op_Inequality : System.Windows.Point * System.Windows.Point -> bool``
``Public Shared Operator != (point1 As Point, point2 As Point) As Boolean``

point1
Point

point2
Point

Boolean

## 示例

``````private Boolean overloadedInequalityOperatorExample()
{
Point point1 = new Point(20, 30);
Point point2 = new Point(45, 70);

// Check whether the two Points are not equal, using the overloaded
// inequality operator.
// areNotEqual is True.
Boolean areNotEqual = (point1 != point2);

return areNotEqual;
}
``````
``````Private Function overloadedInequalityOperatorExample() As Boolean
Dim point1 As New Point(20, 30)
Dim point2 As New Point(45, 70)

' Check whether the two Points are not equal, using the overloaded
' inequality operator.
' areNotEqual is True.
Dim areNotEqual As Boolean = (point1 <> point2)

Return areNotEqual

End Function
``````

## 注解

X Y 使用值描述点的和坐标 DoubleA point's X and Y coordinates are described using Double values. 由于 Double 值在操作时可能会丢失精度，因此，逻辑上相等的两个值之间的比较 Point 可能会失败。Because Double values can lose precision when operated on, a comparison between two Point values that are logically equal might fail.