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对象不相等。 由于 和 point2 上的 point1XYPressureFactor 属性设置为相同的值,因此“两个 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

适用于