StylusPoint.Inequality(StylusPoint, StylusPoint) 運算子

定義

傳回布林值,這個值表示指定的 StylusPoint 物件是否不相等。

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

參數

stylusPoint1
StylusPoint

要比較的第一個 StylusPoint

stylusPoint2
StylusPoint

要比較的第二個 StylusPoint

傳回

如果指定的 StylusPoint 物件不相等,則為 true,否則為 false

範例

下列範例示範如何檢查兩個 StylusPoint 物件是否不相等。 因為和 上的 Xpoint1point2YPressureFactor 屬性都設定為相同的值,所以「這兩個 StylusPoint 物件相等」。訊息隨即出現。

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

備註

這個運算子的對等方法是的否定 Equals

適用於