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 для сравнения.

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

true, если заданные объекты StylusPoint не равны; в противном случае — false.

Примеры

В следующем примере показано, как проверка два StylusPoint объекта для неравенства. XТак как свойства , Yи PressureFactor в point1 и point2 имеют одно и то же значение, свойство "Два объекта 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

Применяется к