Compartilhar via


StylusPoint.Equality(StylusPoint, StylusPoint) Operador

Definição

Compara dois objetos StylusPoint especificados e determina se eles são iguais.

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 ( = ) : System.Windows.Input.StylusPoint * System.Windows.Input.StylusPoint -> bool
Public Shared Operator == (stylusPoint1 As StylusPoint, stylusPoint2 As StylusPoint) As Boolean

Parâmetros

stylusPoint1
StylusPoint

O primeiro StylusPoint a ser comparado.

stylusPoint2
StylusPoint

O segundo StylusPoint a ser comparado.

Retornos

true se os objetos StylusPoint forem iguais, caso contrário, false.

Exemplos

O exemplo a seguir verifica se há igualdade em dois StylusPoint objetos. Como as Xpropriedades , Ye PressureFactor em point1 e point2 são definidas com o mesmo valor, "Os dois objetos StylusPoint são iguais". A mensagem é exibida.

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 equal.");
}
else
{
    MessageBox.Show("The two StylusPoint objects are not equal.");
}
If point1 = point2 Then
    MessageBox.Show("The two StylusPoint objects are equal.")
Else
    MessageBox.Show("The two StylusPoint objects are not equal.")
End If

Comentários

O método equivalente para esse operador é StylusPoint.Equals(StylusPoint, StylusPoint)

Aplica-se a