# Point.Inequality(Point, Point) Operatore

## Definizione

Confronta le due strutture Point per stabilirne la disuguaglianza.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``

#### Parametri

point1
Point

Primo punto da confrontare.The first point to compare.

point2
Point

Secondo punto da confrontare.The second point to compare.

#### Restituisce

`true` se gli oggetti `point1` e `point2` presentano coordinate X o Y diverse. `false` se gli oggetti `point1` e `point2` presentano le stesse coordinate X e Y.`true` if `point1` and `point2` have different X or Y coordinates; `false` if `point1` and `point2` have the same X and Y coordinates.

## Esempi

Nell'esempio seguente viene illustrato come verificare se due Point strutture non sono uguali, utilizzando l'operatore di overload (! =).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
``````

## Commenti

Un punto X e le Y coordinate vengono descritti usando Double i valori.A point's X and Y coordinates are described using Double values. Poiché Double i valori possono perdere precisione quando vengono utilizzati, un confronto tra Point due valori logicamente uguali potrebbe non riuscire.Because Double values can lose precision when operated on, a comparison between two Point values that are logically equal might fail.