# Point.Inequality(Point, Point) Оператор

## Определение

Сравнивает две структуры Point, чтобы выявить различие.Compares two Point structures for inequality.

``````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

Первая точка для сравнения.The first point to compare.

point2
Point

Вторая точка для сравнения.The second point to compare.

#### Возвращаемое значение

Значение `true`, если точки `point1` и `point2` имеют разные координаты X или Y; `false`, если точки `point1` и `point2` имеют одинаковые координаты X и Y.`true` if `point1` and `point2` have different X or Y coordinates; `false` if `point1` and `point2` have the same X and Y coordinates.

## Примеры

В следующем примере показано, как проверить, не Point равны ли две структуры, используя перегруженный оператор (! =).The following example shows how to check whether two Point structures are not equal, using the overloaded (!=) operator.

``````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 Double и Y координаты описываются с помощью значений.A 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.