StylusPoint.Inequality(StylusPoint, StylusPoint) Betreiber

Definition

Gibt einen booleschen Wert zurück, der angibt, ob die angegebenen StylusPoint-Objekte ungleich sind.

public:
 static bool operator !=(System::Windows::Input::StylusPoint stylusPoint1, System::Windows::Input::StylusPoint stylusPoint2);
public static bool operator != (System.Windows.Input.StylusPoint stylusPoint1, System.Windows.Input.StylusPoint stylusPoint2);
static member op_Inequality : System.Windows.Input.StylusPoint * System.Windows.Input.StylusPoint -> bool
Public Shared Operator != (stylusPoint1 As StylusPoint, stylusPoint2 As StylusPoint) As Boolean

Parameter

stylusPoint1
StylusPoint

Der erste zu vergleichende StylusPoint.

stylusPoint2
StylusPoint

Der zweite zu vergleichende StylusPoint.

Gibt zurück

true, wenn die angegebenen StylusPoint-Objekte ungleich sind, andernfalls false.

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie zwei StylusPoint Objekte auf Ungleichheit überprüft werden. Da die XEigenschaften , Yund PressureFactor auf point1 und point2 auf den gleichen Wert festgelegt sind, sind die beiden StylusPoint-Objekte gleich. Die Meldung wird angezeigt.

StylusPoint point1 = new StylusPoint();
StylusPoint point2 = new StylusPoint();

point1.X = 150;
point1.Y = 400;
point1.PressureFactor = 0.45f;

point2.X = 150;
point2.Y = 400;
point2.PressureFactor = 0.45f;
Dim point1 As New StylusPoint()
Dim point2 As New StylusPoint()

point1.X = 150
point1.Y = 400
point1.PressureFactor = 0.45F

point2.X = 150
point2.Y = 400
point2.PressureFactor = 0.45F
if (point1 != point2)
{
    MessageBox.Show("The two StylusPoint objects are not equal.");
}
else
{
    MessageBox.Show("The two StylusPoint objects are equal.");
}
If point1 <> point2 Then
    MessageBox.Show("The two StylusPoint objects are not equal.")
Else
    MessageBox.Show("The two StylusPoint objects are equal.")
End If

Hinweise

Die äquivalente Methode für diesen Operator ist die Negation von Equals

Gilt für: